On Tue, Apr 15, 2008 at 10:04 AM, <[EMAIL PROTECTED]> wrote: > > Hi > > I try to add translation for Thai language. I did following, > > 1. My environment is Window so I use Window version of xgettext, see > http://gnuwin32.sourceforge.net/packages/gettext.htm > 2. Under my application path, I created directory conf/locale. > 3. Executed make-messages.py -l th. > 4. I can see conf\locale\th\LC_MESSAGES\django.po.
For aplications this should be locale\th\LC_MESSAGES (no intermediate conf\). See: http://www.djangoproject.com/documentation/i18n/#message-files > 5. I successfully executed make-messages.py -a. > 6. Comoiled, compile-messages.py > 7. Set LANGUAGE_CODE to "th". > 8. Tested by adding trans tag in template (using message I've added > in .po file). > 9. Try to force session and cookie language. > 10 Nothing is translated. > Perhaps you missed this part from the documentation: http://www.djangoproject.com/documentation/i18n/#how-django-discovers-language-preference " The LocaleMiddleware can only select languages for which there is a Django-provided base translation. If you want to provide translations for your application that aren't already in the set of translations in Django's source tree, you'll want to provide at least basic translations for that language. [...] A good starting point is to copy the English .po file and to translate at least the technical messages — maybe the validator messages, too. " This is relevant because Django itself hasn' t yet been translated to Thai. I would recommend you to read: http://www.djangoproject.com/documentation/i18n/ to avoid these gotchas, The two problems you' ve found seem to be related to not following what's documented there. Good luck, -- Ramiro Morales --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---