[dev] Re: [cvs] commit: horde/services language.php

Marko Djukic mdjukic at horde.org
Mon Dec 1 18:42:02 PST 2003


Quoting Marko Djukic <tech at oblo.com>:

> mdjukic     2003/12/01 17:27:12 PST
>
>   Added files:
>     services             language.php
>   Log:
>   language selection script

this is not working as intended. the idea is to have a language selection box
whilst in an app so that a guest browsing could switch over in a click to the
language they prefer.

setting the language in this script as:
$_SESSION['horde_language'] = NLS::select();
works perfectly for guests, but fails for users. ie whatever they select from
the box just gets overridden by the prefs setting they may or may not have set
(ie. any defaults in prefs.php).

if i do it using prefs as it is in this commit it doesn't work for guests.

i don't wish to do it by separating out the logic, testing whether guest or user
and doing each one's respective logic... unless anyone else doesn't see the
prefs being set in such a way as bad? wanted to avoid setting any prefs here
and to keep it a session-only type of setting.

m.


More information about the dev mailing list