Re: RFC - Storing translated values in a PropertyBag



Havoc Pennington <hp redhat com> writes:

> Martin Baulig <martin home-of-linux org> writes: 
> > For GConf (FIXME: I don't know how GConf handles translated strings), we
> > should try to implement this natively - I don't know enough about GConf,
> > but it seems to have a list type and a pair type, so it should be possible
> > to map Bonobo::Config::LocalizedString to a pair of strings and
> > Bonobo::Config::LocalizedStringList to a sequence of pairs of strings.
> 
> What GConf does is simply return the string in the current
> (client-side) locale. It properly handles a list of languages in the
> locale, etc.

How does gconfd know which locale the client is using ?

> There's a get_with_locale() function to get a string in a specific
> locale, but this is really only useful in admin tools or something.
> 
> I would suggest a getValueWithLocale() method rather than putting the
> locale in the key name, because typically I'm going to specify the
> locale programmatically, and it's lame to have to sprintf it into the
> string.

Hmm, yes.


-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]