nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] Ordering languages


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] Ordering languages
Date: Wed, 19 Jun 2002 11:30:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020610 Debian/1.0.0-1

Garikoitz Araolaza wrote:

JDavid

Yes, that's my suggestion, something like:

 langs = Localizer.get_languages_map()
 langs.sort(lambda x,y: cmp(x['id'], y['id']))
 return langs


Ok... I didn't explain correctly myself... My actual Python skills include sorting items ;-)


Happy to know ;-)


I just wanted to edit every LocalPropertyManager object so that their language order match with the order in the home of the site without loosing their content and avoiding sorting in every request.


Ok, the behaviour could be: if there's a Localizer object, show the
languages in the order it specifies.

A patch is needed, it could be in "LanguageManager.get_languages_tuple",
if you want this behaviour to be applied also to other management screens
(the message catalog, etc..)

Other option is to specialize this method in the LocalPropertyManager class.

What do you prefer?



And then add it to your FAQ ;-)


Does it really deserve an F ? or only  AQ ?   ;-)

Note that everything you put in the FAQ is not going to be forgetted,
I will read it sometime in the future and see how to improve Localizer
to make these tasks easier.


Yes... I will be able to release a really big FAQ book called "Everything you always wanted to know about Localizer... but were afraid to ask"

;-)


I'm impatient to see it, and to declare you king of the Localizer
documentation ;-)


--
J. David Ibáñez, Nuxeo.com
Python programmer (http://www.python.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]