I do this with python 2.7 + Jinja2 with messages.po files. The same 
app<http://classifiedsmarket.appspot.com>can serve a Brazilian 
domain in Brazilian Portuguese <http://www.montao.com.br> and an Indian 
domain in plain English <http://www.koolbusiness.com>.
I don't use namespaces for this however since namespaces AFAIK you can only 
select one while a sometimes want to display for all "namespaces" (domains)
So I do the localization low-level and I must also think of that decimal 
formatting, date formatting and timezones differ within my app and it's 
this that I'm nowadays working on a solution for. 
The library I use for internationalization is the i18n from webapp2_extras 
and the undocumented approach I use is loading i18n to the Jinja2 library:

jinja_environment.install_gettext_translations(i18n)

Then my logic is basically just checking the host for the domain

            host = self.request.host
            if host.find('.br') > 0:
              i18n.get_i18n().set_locale('pt-br')               

#otherwise default to English

You can get language / locale from HTTP get, HTTP session, HTTP header och 
cookie and I posted on 
SO<http://stackoverflow.com/questions/8514017/how-to-decide-the-language-from-cookies-headers-session-in-webapp2>about
 it.
When you know serverside what locale it is, you also pass it on via 
javascript to the javascript components if you have.

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/68s2H4zWkHgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to