Hi all,
I own a blog mainly in French, but sometimes I also write some English messages. Moreover, most plugins/blog are both languages capable. If I had defined WPLANG to en_EN (config.php file), almost all the blog would be in English.
Thus, I was wondering why Wordpress doesn't implement a fully automated option, which is on my very config.php, for instance, to recognize the user browser language. Google does this. I implemented a code on my blgo to do (part) of this :
$browserlanguageis = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if ( $browserlanguageis == "en" ) {
define ('WPLANG', 'en_EN');
} else {
define ('WPLANG', 'fr_FR');
}
which replaces
define ('WPLANG', 'fr_FR');
I'm wondering if this code (may) involve any security issue? I can understand Wordpress doesn't implement all languages available (it would be a huge waste of space), but I don't know if this kind of piece of code could be a security hole...
What do you think?