﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1233	i18n does not work for win32	Jaroslaw Zabiello	Adrian Holovaty	"I try to test http://www.djangoproject.com/documentation/i18n/ but it does not work for win32. If I add. I created all correct .po & .mo files . Django always displays the content of msgid instead of msgstr. I tried (according to mentioned manual) the following code to settings.py file:
{{{
LANGUAGES = (
  ('de', _('German')),
  ('en', _('English')),
)
}}}

But... after that I have problems with starting the server:
{{{
D:\i18n-test\myproject>python manage.py runserver
Traceback (most recent call last):
  File ""manage.py"", line 4, in ?
    import settings # Assumed to be in the same directory.
  File ""D:\i18n-test\myproject\settings.py"", line 72, in ?
    LANGUAGES = (
NameError: name '_' is not defined
}}}

Hmmn, if I have changed it to the following:
{{{
from django.utils.translation import gettext as _
LANGUAGES = (
  ('de', _('German')),
  ('en', _('English')),
)
}}}

...another exception raises:

{{{
D:\i18n-test\myproject>manage.py server
Traceback (most recent call last):
  File ""D:\i18n-test\myproject\manage.py"", line 4, in ?
    import settings # Assumed to be in the same directory.
  File ""D:\i18n-test\myproject\settings.py"", line 72, in ?
    LANGUAGES = (
  File ""c:\opt\python24\lib\site-packages\Django-0.91-py2.4.egg\django\utils\translation.py"", line 242, in gettext
    from django.conf import settings
  File ""c:\opt\python24\lib\site-packages\Django-0.91-py2.4.egg\django\conf\settings.py"", line 34, in ?
    raise EnvironmentError, ""Could not import %s '%s' (is it on sys.path?): %s"" % (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e)
EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'myproject.settings' (is it on sys.path?): cannot import name settings
}}}


"	defect	closed	Core (Other)		critical	invalid	i18n win32		Unreviewed	0	0	0	0	0	0
