I tried to change the language from en_us to something different.
Whenever I saved the language all my labels would change to the
configured language. But as soon as I click a link I'm getting the
language that is in the config file ( default that's en, but if you
change it to es it will be spanish..). The language is correctly saved
to the database. I've looked into the code and found what is causing it.
See this snippet from main.inc:

78   // init session
79   session_start();
80   $sess_id = session_id();
81
82    $_SESSION['user_lang'] =
rcube_language_prop($CONFIG['locale_string']);
83  // create session and set session vars
84  if (!$_SESSION['client_id'])
85    {
86    $_SESSION['client_id'] = $sess_id;
87    $_SESSION['user_lang'] =
rcube_language_prop($CONFIG['locale_string']);
88    $_SESSION['auth_time'] = mktime();
89    $_SESSION['auth'] = rcmail_auth_hash($sess_id,
$_SESSION['auth_time']);
90    unset($GLOBALS['_auth']);
91    }
92
93  // set session vars global
94  $sess_auth = $_SESSION['auth'];
95  $sess_user_lang = rcube_language_prop($_SESSION['user_lang']);



$sess_user_lang is used in rcube_label to find the language we want. It
is set in two files save_prefs.inc (which is why my labels change
correctly after saving). The other place it is set is here in main.inc
at line 95. It uses the _SESSION['user_lang'] value. So this _SESSION value
should be correctly filled. Is it? No (or at least it's overridden) Check line 82... with that line
in place it doesn't matter anymore what language you had saved in your
session. When I remove the line everything works as a charm. Is there
someone who can correct this in CVS also...


Sincerely,

Mark


Note: I tried to send this mail earlier today, but from a not-subsribed account. I do hope you all don't receive it twice.