<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Language selection at login fails</title> 
  <pubDate>Fri, 10 Apr 2026 09:04:29 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9437</link> 
  <atom:link rel="self" type="application/rss+xml" title="Language selection at login fails" href="https://bugs.horde.org/ticket/9437/rss" /> 
  <description>Language selection at login fails</description> 
 
   
   
  <item> 
   <title>$conf[&#039;auth&#039;][&#039;driver&#039;] = &#039;application&#039;;
$conf[&#039;auth&#039;][&#039;par</title> 
   <description>$conf[&#039;auth&#039;][&#039;driver&#039;] = &#039;application&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;app&#039;] = &#039;imp&#039;;

I use Firefox 3.6.12 
about:config =&gt; intl.accept_languages = &quot;fr, fr-fr,en-us, en&quot;


No matter what language I select, Horde always log me in using the French language.

If I change Firefox &#039;s setting to intl.accept_languages = &quot;en-us, en,fr, fr-fr&quot;, Horde will always appear in english.



</description> 
   <pubDate>Wed, 08 Dec 2010 13:21:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61035</link> 
  </item> 
   
  <item> 
   <title>Michael just fixed a bunch of issues with language selection</title> 
   <description>Michael just fixed a bunch of issues with language selection in the login screen. Does this fix your problem?</description> 
   <pubDate>Mon, 20 Dec 2010 23:30:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61131</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9437: F</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9437: Fix language selection via login screen

http://git.horde.org/horde-git/-/commit/f8eb4531db2bacffbff430b8774e1fb16350cd2e</description> 
   <pubDate>Tue, 21 Dec 2010 22:13:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61149</link> 
  </item> 
   
  <item> 
   <title>No - this was an issue with the Registry auth code where we </title> 
   <description>No - this was an issue with the Registry auth code where we were always calling setLanguageEnvironment() after set the authentication credentials with the value of the user&#039;s language preference.  Instead, we want to grab the language information from the non-authenticated session and set to this value (if possible) in order to match the login screen.</description> 
   <pubDate>Tue, 21 Dec 2010 22:20:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61150</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Bug #</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Bug #9437: Fix language selection via login screen
&gt;
&gt; http://git.horde.org/horde-git/-/commit/f8eb4531db2bacffbff430b8774e1fb16350cd2e

I&#039;m still having this issue.
Need a trace ? Where can I look ?</description> 
   <pubDate>Wed, 22 Dec 2010 08:07:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61156</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;m still having this issue.
&gt; Need a trace ? Where can I</title> 
   <description>&gt; I&#039;m still having this issue.
&gt; Need a trace ? Where can I look ?

Look at Horde_Registry::preferredLang() - it should reach the second if clause if it is working properly.</description> 
   <pubDate>Wed, 22 Dec 2010 08:51:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61159</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Ticket #9437</title> 
   <description>Changes have been made in Git for this ticket:

Ticket #9437: Tweak preferred language selection.
I *think* this should be the behavior (precedence-wise):

Pre-auth
--------

Prefs will most likely be unavailable or default language is empty.
Language will be set based on language drop-down on login refresh (if
language switching allowed)
Session language is used (pre-auth session will have language set if the
login screen has been reloaded)
System-wide default used (nls config)
Finally, browser detection.

Post-auth
---------

Value in user&#039;s prefs will ALWAYS control (regardless of login screen
language selection)
Language from login screen will be used (if language switching allowed)
On initial login session is new/clean; language info unavailable here
On subsequent login, this contains the session language (code will
ALWAYS stop here after user is authenticated)
System-wide default used (nls config)
Finally, browser detection.

http://git.horde.org/horde-git/-/commit/f3e1f1c153b3c70a21748bba366e81a1a1dfe594</description> 
   <pubDate>Wed, 22 Dec 2010 18:07:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61166</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve tweaked the code some more, so try now.

Note that th</title> 
   <description>I&#039;ve tweaked the code some more, so try now.

Note that the login language selection will NEVER work if the user has a &#039;language&#039; prefs value set.</description> 
   <pubDate>Wed, 22 Dec 2010 18:10:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61169</link> 
  </item> 
   
  <item> 
   <title>That&#039;s not quite correct.

&gt; Pre-auth
&gt; --------
&gt;
&gt; Pr</title> 
   <description>That&#039;s not quite correct.

&gt; Pre-auth
&gt; --------
&gt;
&gt; Prefs will most likely be unavailable or default language is empty.
&gt; Language will be set based on language drop-down on login refresh (if
&gt; language switching allowed)
&gt; Session language is used (pre-auth session will have language set if the
&gt; login screen has been reloaded)
&gt; System-wide default used (nls config)
&gt; Finally, browser detection.

That should be:

1. Default preference, if locked.
2. Language will be set based on language drop-down on login refresh (if language switching allowed)
3. Session language is used (pre-auth session will have language set if the login screen has been reloaded)
4. Finally, browser detection.
5. System-wide default used (nls config)

&gt; Post-auth
&gt; ---------
&gt;
&gt; Value in user&#039;s prefs will ALWAYS control (regardless of login screen
&gt; language selection)
&gt; Language from login screen will be used (if language switching allowed)
&gt; On initial login session is new/clean; language info unavailable here
&gt; On subsequent login, this contains the session language (code will
&gt; ALWAYS stop here after user is authenticated)
&gt; System-wide default used (nls config)
&gt; Finally, browser detection.

1. Value in user&#039;s prefs will ALWAYS control (regardless of login screen language selection)
2. Language from login screen will be used (if language switching allowed)
On initial login session is new/clean; language info unavailable here
On subsequent login, this contains the session language (code will ALWAYS stop here after user is authenticated)
3. Finally, browser detection.
4. System-wide default used (nls config)
</description> 
   <pubDate>Wed, 22 Dec 2010 18:43:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61170</link> 
  </item> 
   
  <item> 
   <title>You want nlsconfig to be last (below browser detection)? I h</title> 
   <description>You want nlsconfig to be last (below browser detection)? I have no problems with that, except that this is the way it has been forever (at least in H3).

I do have an issue with this though:

&gt; 1. Default preference, if locked. (pre-auth)

Why does it make a difference if it is locked?  A preference value is a preference value.  Its locked status does not change the value; locking only influences whether the preference value can be *changed*.  When determining the preferred language, if there is a value set for the &#039;language&#039; preference, whether it is locked or not or whether it is the default user or an actual user, it doesn&#039;t matter.  All that matters is that a value exists and it is not blank (previously, this was broken - if the preference was locked but set to blank, we would skip all other determinations and default to en_US which is surely not what is wanted).

For example, an admin could set a default language in the prefs, but keep it unlocked, and a guest user could theoretically go in and change this value in the prefs.  The default value should be used until that happens though - it shouldn&#039;t be ignored.</description> 
   <pubDate>Wed, 22 Dec 2010 19:06:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61171</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;ve tweaked the code some more, so try now.
&gt;
&gt; Note th</title> 
   <description>&gt; I&#039;ve tweaked the code some more, so try now.
&gt;
&gt; Note that the login language selection will NEVER work if the user 
&gt; has a &#039;language&#039; prefs value set.

still not working. I deleted prefs and cache before trying.

I&#039;ll try to look at Horde_Registry::preferredLang()
</description> 
   <pubDate>Thu, 23 Dec 2010 08:21:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61176</link> 
  </item> 
   
  <item> 
   <title>public function preferredLang($lang = null) 

I always get</title> 
   <description>public function preferredLang($lang = null) 

I always get to : return basename($GLOBALS[&#039;session&#039;]-&gt;get(&#039;horde&#039;, &#039;language&#039;)) =&gt; fr_FR

$lang is always null/empty.
Calls to function preferredLang don&#039;t have any argument. That&#039;s probably why $lang is always empty.

#grep preferredLang -r /var/www/html/horde
libs/Horde/Registry.php:    public function preferredLang($lang = null)
libs/Horde/Registry.php:            $lang = $this-&gt;preferredLang();
libs/Horde/Core/Ui/Language.php:            $session-&gt;set(&#039;horde&#039;, &#039;language&#039;, $registry-&gt;preferredLang());
libs/Horde/Core/Auth/Application.php:        $language = $registry-&gt;preferredLang();
services/language.php:$session-&gt;set(&#039;horde&#039;, &#039;language&#039;, $registry-&gt;preferredLanguage(Horde_Util::getForm(&#039;new_lang&#039;)));

</description> 
   <pubDate>Thu, 23 Dec 2010 08:40:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61177</link> 
  </item> 
   
  <item> 
   <title>&gt; public function preferredLang($lang = null)
&gt;
&gt; I always</title> 
   <description>&gt; public function preferredLang($lang = null)
&gt;
&gt; I always get to : return basename($GLOBALS[&#039;session&#039;]-&gt;get(&#039;horde&#039;, 
&gt; &#039;language&#039;)) =&gt; fr_FR

You are not catching the call on login properly; the session is destroyed when logging in so this value MUST be empty.  This value is initially set in Horde_Registry::setLanguage() (line 2234) so maybe you should check there.</description> 
   <pubDate>Thu, 23 Dec 2010 08:48:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61178</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9437: L</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9437: Last fallback should be nlsconfig default language

http://git.horde.org/horde-git/-/commit/c38ad90cc7788025f6e7a42e1d06bb5b36574d62</description> 
   <pubDate>Thu, 23 Dec 2010 10:28:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61179</link> 
  </item> 
   
  <item> 
   <title>&gt; You want nlsconfig to be last (below browser detection)? I</title> 
   <description>&gt; You want nlsconfig to be last (below browser detection)? I have no 
&gt; problems with that, except that this is the way it has been forever 
&gt; (at least in H3).

What? nlsconfig to be the last? Yes, at least I tried to keep the list in the same order like we have in Horde 3.

&gt; I do have an issue with this though:
&gt;
&gt;&gt; 1. Default preference, if locked. (pre-auth)
&gt;
&gt; Why does it make a difference if it is locked?  A preference value is 
&gt; a preference value.  Its locked status does not change the value; 

This was the only way in Horde 3 to force the interface to a certain language. If we have a different way now to do this that doesn&#039;t stretch the semantic of a locked preference, even better.

&gt; locking only influences whether the preference value can be 
&gt; *changed*.  When determining the preferred language, if there is a 
&gt; value set for the &#039;language&#039; preference, whether it is locked or not 
&gt; or whether it is the default user or an actual user, it doesn&#039;t 
&gt; matter.  All that matters is that a value exists and it is not blank 
&gt; (previously, this was broken - if the preference was locked but set 
&gt; to blank, we would skip all other determinations and default to en_US 
&gt; which is surely not what is wanted).
&gt;
&gt; For example, an admin could set a default language in the prefs, but 
&gt; keep it unlocked, and a guest user could theoretically go in and 
&gt; change this value in the prefs.  The default value should be used 
&gt; until that happens though - it shouldn&#039;t be ignored.

I disagree, at least if I understand you correctly. The language selection in the login screen and the browser&#039;s preferred language should have precedence over the default preference value, that&#039;s what we did in H3.
Though now that I think about it, this would be the only way an admin could set a default language for all users without having to lock it at the same time.</description> 
   <pubDate>Thu, 23 Dec 2010 11:06:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61182</link> 
  </item> 
   
  <item> 
   <title>I re-cleared FF&#039;s cache and *cookies*, and now it is working</title> 
   <description>I re-cleared FF&#039;s cache and *cookies*, and now it is working.
Thanks.
</description> 
   <pubDate>Thu, 23 Dec 2010 11:59:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61184</link> 
  </item> 
   
  <item> 
   <title>&gt; I re-cleared FF&#039;s cache and *cookies*, and now it is worki</title> 
   <description>&gt; I re-cleared FF&#039;s cache and *cookies*, and now it is working.

In fact, it doesn&#039;t always work.

If fields username and password are empty when changing language =&gt; OK.
If either username or password isn&#039;t empty =&gt; NOK.

</description> 
   <pubDate>Thu, 23 Dec 2010 12:05:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61185</link> 
  </item> 
   
  <item> 
   <title>&gt; If fields username and password are empty when changing la</title> 
   <description>&gt; If fields username and password are empty when changing language =&gt; OK.
&gt; If either username or password isn&#039;t empty =&gt; NOK.

It always worked this way. We don&#039;t want to prefill the password field when reloading the page, and we don&#039;t want to lose the entered credentials either.</description> 
   <pubDate>Thu, 23 Dec 2010 13:06:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61186</link> 
  </item> 
   
  <item> 
   <title>&gt; It always worked this way. We don&#039;t want to prefill the pa</title> 
   <description>&gt; It always worked this way. We don&#039;t want to prefill the password 
&gt; field when reloading the page, and we don&#039;t want to lose the entered 
&gt; credentials either.
I understand, but the login script should be able to use the selected language, even if the page hasn&#039;t been reloaded.

I haven&#039;t looked at the code, but it looks like the login process only look for/use variable &#039;new_lang&#039; set in $_GET and not $_POST. But the login form uses method POST.


</description> 
   <pubDate>Thu, 23 Dec 2010 13:35:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61190</link> 
  </item> 
   
  <item> 
   <title>&gt; I haven&#039;t looked at the code, but it looks like the login </title> 
   <description>&gt; I haven&#039;t looked at the code, but it looks like the login process 
&gt; only look for/use variable &#039;new_lang&#039; set in $_GET and not $_POST. 
&gt; But the login form uses method POST.

Yes - this is the case.  And I agree that the language should be changed regardless of the GET/POST status.  e.g you switch language and try to login unsuccessfully - when the login screen reloads, the language should be switched.</description> 
   <pubDate>Thu, 23 Dec 2010 18:50:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61196</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9437: C</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9437: Change language regardless of POST/GET

http://git.horde.org/horde-git/-/commit/893cb996233774ceec8499844c6f8d973a210ef7</description> 
   <pubDate>Thu, 23 Dec 2010 18:50:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61197</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; You want nlsconfig to be last (below browser detection)? </title> 
   <description>&gt;&gt; You want nlsconfig to be last (below browser detection)? I have no
&gt;&gt; problems with that, except that this is the way it has been forever
&gt;&gt; (at least in H3).
&gt;
&gt; What? nlsconfig to be the last? Yes, at least I tried to keep the 
&gt; list in the same order like we have in Horde 3.

In Horde 3 the check for $nls[&#039;defaults&#039;] occurs before the check for HTTP_ACCEPT_LANGUAGE.  At least in NLS::select().

&gt;&gt; I do have an issue with this though:
&gt;&gt;
&gt;&gt;&gt; 1. Default preference, if locked. (pre-auth)
&gt;&gt;
&gt;&gt; Why does it make a difference if it is locked?  A preference value is
&gt;&gt; a preference value.  Its locked status does not change the value;
&gt;
&gt; This was the only way in Horde 3 to force the interface to a certain 
&gt; language. If we have a different way now to do this that doesn&#039;t 
&gt; stretch the semantic of a locked preference, even better.

I just don&#039;t see why isLocked() is necessary in Horde_Registry::preferredLang() is all.  I support the idea that locking the preference prevents language changing, but that should be handled in the login UI.

&gt; I disagree, at least if I understand you correctly. The language 
&gt; selection in the login screen and the browser&#039;s preferred language 
&gt; should have precedence over the default preference value, that&#039;s what 
&gt; we did in H3.
&gt; Though now that I think about it, this would be the only way an admin 
&gt; could set a default language for all users without having to lock it 
&gt; at the same time.

Then what&#039;s the point of the &#039;language&#039; preference?

And maybe I&#039;m reading you wrong, but the login screen language (or browser detection) is used as the language as long as the &#039;language&#039; preference is empty.  But once the &#039;language&#039; preference is filled with a language, to me that is indication by the admin/user that this is the canonical language to use, despite the login screen indication.  And we can&#039;t hide the language selection on login based on this value since we don&#039;t know what that value is for any given user.</description> 
   <pubDate>Thu, 23 Dec 2010 19:12:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61199</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; You want nlsconfig to be last (below browser detection)?</title> 
   <description>&gt;&gt;&gt; You want nlsconfig to be last (below browser detection)? I have no
&gt;&gt;&gt; problems with that, except that this is the way it has been forever
&gt;&gt;&gt; (at least in H3).
&gt;&gt;
&gt;&gt; What? nlsconfig to be the last? Yes, at least I tried to keep the
&gt;&gt; list in the same order like we have in Horde 3.
&gt;
&gt; In Horde 3 the check for $nls[&#039;defaults&#039;] occurs before the check for 
&gt; HTTP_ACCEPT_LANGUAGE.  At least in NLS::select().

Yeah, look like was wrong. Probably because it is empty by default.

&gt;&gt;&gt; I do have an issue with this though:
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; 1. Default preference, if locked. (pre-auth)
&gt;&gt;&gt;
&gt;&gt;&gt; Why does it make a difference if it is locked?  A preference value is
&gt;&gt;&gt; a preference value.  Its locked status does not change the value;
&gt;&gt;
&gt;&gt; This was the only way in Horde 3 to force the interface to a certain
&gt;&gt; language. If we have a different way now to do this that doesn&#039;t
&gt;&gt; stretch the semantic of a locked preference, even better.
&gt;
&gt; I just don&#039;t see why isLocked() is necessary in 
&gt; Horde_Registry::preferredLang() is all.  I support the idea that 
&gt; locking the preference prevents language changing, but that should be 
&gt; handled in the login UI.
&gt;
&gt;&gt; I disagree, at least if I understand you correctly. The language
&gt;&gt; selection in the login screen and the browser&#039;s preferred language
&gt;&gt; should have precedence over the default preference value, that&#039;s what
&gt;&gt; we did in H3.
&gt;&gt; Though now that I think about it, this would be the only way an admin
&gt;&gt; could set a default language for all users without having to lock it
&gt;&gt; at the same time.
&gt;
&gt; Then what&#039;s the point of the &#039;language&#039; preference?
&gt;
&gt; And maybe I&#039;m reading you wrong, but the login screen language (or 
&gt; browser detection) is used as the language as long as the &#039;language&#039; 
&gt; preference is empty.  But once the &#039;language&#039; preference is filled 
&gt; with a language, to me that is indication by the admin/user that this 
&gt; is the canonical language to use, despite the login screen 
&gt; indication.  And we can&#039;t hide the language selection on login based 
&gt; on this value since we don&#039;t know what that value is for any given 
&gt; user.

This is probably the more intuitive and logical approach.</description> 
   <pubDate>Thu, 23 Dec 2010 19:45:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9437#t61200</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
