Re: How to switch languages?

2013-04-22 Thread Cody Scott
I installed django-localeurl and disabled 'django.middleware.locale.LocaleMiddleware', and i18n_patterns but it had the same issue of only translating 'Yes' and 'No' and it reverted back to /en/ on every new page load. On Monday, 22 April 2013 12:08:34 UTC-4, אברהם סרור wrote: > > I sugg

Re: How to switch languages?

2013-04-22 Thread Avraham Serour
I suggest taking a look at django-localeurl, I used it instead of a form to change language on my last project. I believe it is worth taking a look On Mon, Apr 22, 2013 at 6:58 PM, Cody Scott wrote: > How do you get the preferred language? > > In th

Re: How to switch languages?

2013-04-22 Thread Cody Scott
How do you get the preferred language? In the 1.5 docs it says to add 'django.core.context_processors.i18n' to your TEMPLATE_CONTEXT_PROCESSORS which variable is that in your settings.py? If I add it to TEMPLATE_LOADERS and refresh the page I get the error: 'function' object has no attribute 'i

Re: How to switch languages?

2013-04-22 Thread Addy Yeow
There are several ways to switch language ( https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#how-django-discovers-language-preference). I normally set django_language session variable to the preferred language. For 1), have you compiled your messages into .mo files? You will also need

How to switch languages?

2013-04-22 Thread Cody Scott
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('', # et