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

Jan Schneider jan at horde.org
Tue Dec 2 01:34:13 PST 2003


Zitat von Marko Djukic <mdjukic at horde.org>:

> 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.

Using prefs for setting the language is the right way IMO. It actually *is*
a pref and handling it different for a certain case only leads to
confusion. We do this for others prefs like sorting too, btw.

But it should work for guests the same way. Aren't guests meant to have the
session driver for their prefs? Are working any other prefs for guests or
is this completely broken atm?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list