On 1/08/2011 8:09am, Lucy Brennan wrote:
I read Wikipedia and Django docs. Now, after all this debate, I see that I _did_ understand the definitions when I first read it.

Given those definitions however, the meaning of USE_I18N and USE_L10N are not obvious. Far, far, far from obvious. There _absolutely_ has to be some additional explanation of what those two settings does. How can you even think that it is obvious???

Can I try and summarise from the perspective of a new user? I want to include both in my current project so I'm hoping this summary is correct. Please correct me if I'm wrong ...

Localisation L10N - if switched on via USE_L10N = True - means try to detect the user's browser header which reveals the region set in the user's computer. IF detected AND if there is a ../site-packages/django/conf/locale/[xx_XX]/formats.py which corresponds THEN django will magically translate numbers, dates and times accordingly.

Internationalisation i18n - if switched on via USE_I18N = True - means to enable translation of string/unicode literals found in the software PROVIDED the translation mechanism is being used AND translations of the literals exist. This mechanism involves ugettext.py and use of the language code deliberately selected by the user from among those on offer which you (the developer) have made available. The ugettext function goes off and finds the correct prepared translation file (../site-packages/django/conf/locale/[xx_XX]/LC_MESSAGES/django.po/.mo) and uses the literal as an index into that file and returns the translation for display to the user. That's the django translations. For your own software translations you have to prepare your own [app].po/.mo file.

If there is someone with experience in this area who can comment on this or correct it please?

Thanks

Mike



So since I could not figure that out, I started looking for explanations. And somewhere I found, that the settings meant respectively: translation and localized formatting. And that is why I sent this post on quite a detour. Sorry about that.

Do you people realize that if a newbie reads a) Wikipedia on I/L b) Django on I/L, c) this thread. They will still not understand what those two settings do!

@ Russell: I would not hesitate to help writing the documentation. But I simply don't know what those settings do. So I can't write it. (tragicomic smiley)

Lucy

--
You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/d9ShQzQ7tnsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to