Re: RFC - Storing translated values in a PropertyBag



Dietmar Maurer <dietmar ximian com> writes:

> Martin Baulig wrote:
> 
> > My proposal - PART I:
> > =====================
> >
> > a) getValue ("/bonobo-config-test/test-string") returns the untranslated
> >    string as CORBA::string. I think this is what it already does.
> >
> > b) getKeys ("/bonobo-config-test/test-string") returns a list of all the
> >    languages ("de", "es", "sv").
> >
> > c) getValue ("/bonobo-config-test/test-string[de]") returns the german
> >    translation as Bonobo::Config::LocalizedString.
> >
> >    Optionally, this can do a lookup in the language list (so if the
> >    xmldb file contains "de_DE" and you ask for "de", it'll first check
> >    for "de" and then for "de_DE" etc.) - and we can also allow multiple,
> >    comma separated locales in the square brackets.
> >
> 
> Maybe we should also consider a special method:
> 
> getLocalizedValue (in string key, in string locale);

Hmm, IMO this is really a good idea.

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




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