Re: how to let user change the language
So, what part, exactly is a problem? What have you tried?
On Sun, Aug 12, 2012 at 6:52 PM, Gelonida N <gelonida@gmail.com> wrote:
On 08/12/2012 08:46 PM, Marcin Tustin wrote:Thanks for your answer.
This is linked from the Django front page:
https://docs.djangoproject.com/en/1.4/topics/i18n/
Come back with specific questions when you get stuck.
I created already all the l18n messages and I can switch the language site wise by changing the language in settings.py
However Now I'd like to change them via user preferences. (not cookies)
(So if one user changes the language on one m,achine it should be changed on any other machine if he logs in.
I'd prefer not to set the language as suggested by the browser, but let the user the choice even if his useragent suggests another prefered language.
There seems to be a url based approach and a cookies based approach I wonder what would be best for my scenario.
(I am in full control of the web server and can add redirects / rewrite rules, etc. if this helps)
This might be explained somewhere in more details in the Django docss however I did not find the related page.
The doc mentions:
"It uses these hooks to localize Web apps for particular users according to their preferences."
but I did not find the how
<mailto:gelonida@gmail.com>> wrote:<mailto:django-users@googlegroups.com>.
I'd like to have a web site, where the can switch the language
The first time the user connects the language would be the prefered
language as sugegsted by the news agent,
then the user could select the prefered lanngauge in some user
preference settings.
What would be the standard way to do this in Django?
Thanks in advance for comments, examples, snippets, links,
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.comdjango-users+unsubscribe@__googlegroups.com
To unsubscribe from this group, send email to
<mailto:django-users%2Bunsubscribe@googlegroups.com>.http://groups.google.com/__group/django-users?hl=en
For more options, visit this group at
<http://groups.google.com/group/django-users?hl=en>.
--
Marcin Tustin
Tel: 07773 787 105
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Marcin Tustin
Tel: 07773 787 105
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home