Re: response to il8n locale + lang storage
Manuel Holtgrewe <[email protected]> Sun, 27 Mar 2005 14:23:46 +0200
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
alex black schrieb: > from jcm: > > in reply to bc_include_once() chicken and egg pb from Manuel > we agreed on irc that the AcceptLanguage should be stored in Client, > once analazed > but we didn't agree on where to place current lang & locale > i'm in favour of having it in User > (User being saved in Session) > Manuel prefers having current valid lang/locale be stored into i18n > I fear duplication, if we want later to extend User with prefs stored in > db. Lang is obviously one of the possible user prefs > 4:40 PM > 'ill be back tomorrow, i really need to sleep now > > ------ > > On hearing this, I would tend to agree with jcm - that is should be > stored in user because it can be a matter of preference. > > However - to also store it in il8n isn't duplicative, in il8n you could > store the current lang + locale, and in user you could store the user > prefs - the two should but will not always be the same. Yes, language choices are preferences that should be stored in a "UserAccount" data. However, User is currently in Auth and I don't see what language preferences have in common with any other thing in the auth data. I'd rather introduce an I18nState class in i18n that manages the state and makes the current locale/language etc. available. I don't think we would ever want to extend User, but rather to provide a vortex class in an "usermanagement" module that provides a UserAccount class. This class would then use auth.User, i18n.I18nState and env.Client to provide its services. *m -- GPG key: http://www.ggnore.net/~mholtgrewe/personal/files/public_key.asc _______________________________________________ dev mailing list dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected] http://lists.binarycloud.com/mailman/listinfo/dev