I am trying to get translations to work on my site.

I have marked words for translation and they show up in the django.po file.

I am wondering what is the proper way to switch the current language.

Currently I have the following in my project urls.py

urlpatterns = i18n_patterns('',
    #.... etc
)

urlpatterns += patterns('', 
    (r'^i18n/', include('django.conf.urls.i18n')),
)

And to switch languages I change the /en/ in my url to /ja/ or /fr/.

I have two issues. 

1) The page is not being translated except for 'Yes' and 'No' which are 
translated even if I remove them from my .po file. So there must be a 
default set of translation words? Or Chrome is seeing the /fr/ in the URL 
and translating it for me? I can't explain why that is happening. Even if I 
change what 'Yes' and 'No' translate to it doesn't change what is displayed.

2) The next page I visit reverts to a English with the /en/. Yes english is 
my default language in settings.py.

#settings.py
#Used for translations
gettext = lambda s: s
LANGUAGES = (
    ('en', gettext('English')),
    ('fr', gettext('French')),
    ('ja', gettext('Japanese')),
)


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to