Adding localization feature to a web-project

Pierre Quentel quentel.pierre at wanadoo.fr
Wed Nov 5 12:28:03 EST 2003


--- In python-list at yahoogroups.com, "Thomas Weholt" <2002 at w...> 
wrote:
> Hi,
> 
> I'm doing a web-project using Python and was wondering how I can 
add a
> localization option to my web-pages? Does anybody have any hints 
or ideas?
> I'm using simpleTal/es as a template-engine.
> 
> I need to let the user specify (or download a language pack ) and 
customize
> central text elements in a web-portal according to his/her needs.
> 
> If anybody can share some thoughts or examples on how they did 
this or ideas
> on a system which makes such localization packs easy to maintain, 
that would
> help alot.
> 
> Thanks in advance,
> Thomas
> 

Not sure if it's really what you need, but you might take a look at 
Karrigell (http://karrigell.sourceforge.net) and especially the 
internationalization feature in it :
http://karrigell.sourceforge.net/en/internationalization.htm

It uses pygettext : strings to be translated are written like :

   _("A string to translate")

but the web interface to the files created by gettext makes 
translations easier to maintain

Here the user only specifies a language preference with his web 
browser, it is not a personalized translation ; to do so you'd have 
to use session handling and a database with every user's preferences

Pierre






More information about the Python-list mailing list