I'm have looked at something strange this morning that 'bugs' me now for sometime.
Go overhere : http://www.papy-team.fr/roster/index.php?p=rostercp (read on for info) and try to set the roster language in "Main Settings" to French.
Selecting frFR in the select box will, but a quick look will confirm that if the setting was any different from frFR before, the 'locale' string won't be written to roster_config table.
Somehow, in config.lib.php, on line 476, the code decides that the value didn't changed.
The var name $settingName is correctly formed to 'locale' and $settingValue is 'frFR'.
Even if (should be) << $config[$settingName] >> is set to i.e. enUS, and I select 'frFR', the if statement isn't true.
Meaning, $config[$settingName] (is $config['locale'] ! ) is always 'frFR', even if selected a value in the drop down box that was something different (and thus, the value in the database config tabe ) before.
Needless to say, I'm using a French browser.
This means I can't set the langauge on the cp page to frFR, it won't "stick" because never written to the table.
(Up until now, I considered as a minor, tiny, annoying issue - I hopped phpMyAdmin directly after a re-install to have things my way).
After some checking I discovered this on line 65 in lib/locale.php:
- Code: Select all
if( isset($_SESSION['locale']) && $_SESSION['locale'] != '' )
{
$roster->config['locale'] = $_SESSION['locale'];
}
So, $config['locale'] has already being set to 'frFR' in my case, even if the value in the database table 'roster_config' is different - and thus should be over written.
These statement are present in locale.php, included directly by seettings.php, and are part of the constructor of the class roster_locale.
This means that a changing to 'frFR' in the drop down box will not be having any effect, the change won't be written to the config table because the code concludes that nothing changed !
The nasty part :
I can't propose a correct solution for this.
-> Is the language select box not needed on the admin 'cp' page ?
or
-> Shouldn't there only be one, the one in the top box, who is public ?
-> The code in processData() chould contain code to override the $roster->config['locale']... case or even writing ALL the config vars to the table, no mather what..
-> if( isset($_SESSION['locale']) && $_SESSION['locale'] != '' ) should be disabled, so that roster->config['locale'] is set the table choix, instaed of the browser choix ?
-> if( isset($_SESSION['locale']) && $_SESSION['locale'] != '' ), if set, should set roster->locale directly (which I tried, and seems succesfull)
Anyway, enough info to get the point.
I understand that you didn't saw this point that easily, you're working with the default setup of the roster.
In theory, you could switch your dev roster to another language, and then try to switch back again - you should be confronted with the problem I described here.
Btw : don't think that this is a typical frFR thing, but if needed, PM and I PM you my roster password back, so you can fool around with roster to try for yourself.