multilingual - Django multi-lingual site : how to? -


i want have website in 3 languages , allow user change preffered language somewhere in template. models need translating. found few libraries perhaps should use :

https://code.google.com/p/django-multilingual/ traslating models

https://pypi.python.org/pypi/django-localeurl/1.4 language prefix in url's

https://docs.djangoproject.com/en/dev/topics/i18n/ translating static parts of site

however can't understand how these come together. perhaps give me rundown of steps translate website.

you can use i18n_patterns instead of django-localeurl if use django 1.4. or later.

i18n_patterns set active language based on url prefix.

django i18n serve translated messages in python code , templates based on active language . (you have makemessages , compilemessages create , compile translations).

for translations in model there lot of libraries, majority of them use active language serve field translation. prefer django-modeltranslation, allows translating of 3rd party app models without changing code.

hope helps!


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -