Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Dynamic Internationalisation system to use in Django projects?

I am developing a new project from scratch with Django. I see that there are many apps for handling translation of dynamic content.

  • Django-multilingual
  • Django-pluggable-model-i18n
  • Django-modeltranslation
  • Transdb
  • Django-multilingual-model-
  • Django-transmeta

to name few.

Transdb, transmeta and multilingual sounded fair, but I want to read some personal experiences.

Which one of them should I choose?

like image 554
yigit Avatar asked Aug 20 '10 14:08

yigit


People also ask

What is internationalization in Django?

The goal of internationalization and localization is to allow a single web application to offer its content in languages and formats tailored to the audience. Django has full support for translation of text, formatting of dates, times and numbers, and time zones.

What is i18n in Django?

One of the inbuilt features of Django is internationalization (popularly referred to as i18n). This article shows how to utilize i18n to reduce language barriers in web applications by offering their content in languages tailored to the audience.

What is Gettext_lazy in Django?

gettext_lazy is a callable within the django. utils. translation module of the Django project.

Which among the given below internationalization function in Django marks a string as a translation string without actually translating it at that moment?

Lazy Translation utils. translation. ugettext_lazy() to translate strings lazily – when the value is accessed rather than when the ugettext_lazy() function is called. In this example, ugettext_lazy() stores a lazy reference to the string – not the actual translation.


2 Answers

I agree with S.Lott in that you will want to think about what you need from internationalization. However, this is a very good run-down of all of the mentioned packages:

http://blog.muhuk.com/2010/01/06/dynamic-translation-apps-for-django.htm

My personal pick thus far is "none of the above". I am currently prototyping with datatrans:

http://github.com/citylive/django-datatrans

http://www.botondus.com/dynamic-translation-with-django-datatrans/

But I may yet choose another solution.

like image 168
bogeymin Avatar answered Nov 08 '22 16:11

bogeymin


There are 2 kinds of model translation:

  1. Adding extra columns/fields to the model to translate
  2. Using a second table for translations

The 1st approach is more efficient because you don't use extra joins. And the 2nd one is less intrusive because it doesn't modify the original model table. I personally like the 1st option better and that's one of the main reasons why I use django-modeltranslation.

You can also have a look to this comparison grid.

like image 22
Juande Carrion Avatar answered Nov 08 '22 15:11

Juande Carrion