So if one has two browser windows open, one with the front end and one with the admin, and say both are currently set to english. Then if one changes the language to, say, French in the front end, then goes to the admin and selects another menu item, then suddenly you will see the admin language has also switched to French. I don not think this is desirable. One should be able to set both languages independently. Preferably the admin lang. can be changed with a dropdown as on the front end.
But in the mean time, I have created a simple modification so that you can hard set the admin to the language of your choice. Say, you want to set the admin language to French (fr), then make the following 3 changes:
1.In config.php add this line at the end:
define('FORCE_LANGUAGE', FALSE);
2.In admin/config.php add these lines at the end:
define('FORCE_LANGUAGE', TRUE);
define('SET_LANGUAGE', 'fr');
3.In system/library/language.php change lines 27-35 from:
Code: Select all
if (array_key_exists(@$this->session->data['language'], $this->languages)) {
$this->set($this->session->data['language']);
} elseif (array_key_exists(@$this->request->cookie['language'], $this->languages)) {
$this->set($this->request->cookie['language']);
} elseif ($browser = $this->detect()) {
$this->set($browser);
} else {
$this->set($this->config->get('config_language'));
}
Code: Select all
if (FORCE_LANGUAGE) {
$this->session->data['language']=SET_LANGUAGE;
$this->set($this->session->data['language']);
}
else {
if (array_key_exists(@$this->session->data['language'], $this->languages)) {
$this->set($this->session->data['language']);
} elseif (array_key_exists(@$this->request->cookie['language'], $this->languages)) {
$this->set($this->request->cookie['language']);
} elseif ($browser = $this->detect()) {
$this->set($browser);
} else {
$this->set($this->config->get('config_language'));
}
}