You are not logged in.

Change Language:

Board >> Django >> Python Programming >> settings.py configuration for internationalization (i18n)

Page: 1

Hi All,

I have recently started using django for one of our applications. I am experiencing issues in implementing internationalization using django.

In my settings.py, I have set the following:
(attached is my complete settings.py file)

1) USE_I18N = True

2) LANGUAGE_COOKIE_NAME = 'django_language'

3) LANGUAGES = (
('en', _('English')),
('ja', _('Japanese')),
('hi', _('Hindi'))
)

4) MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware'
)

Now my requirement is, using single settings.py file, I need to support my application for multiple languages
i.e., when I change the locale in the browser (ex: hi_IN, ja_JP), it should display the content in the selected language.

If I am manually changing LANGUAGE_CODE = 'hi' in settings.py, application is working fine.
But I want to avoid, this manual changes in the settings.py file.

Please let me know if I am missing any configuration settings in settings.py file.

Any help in this regard would be greatly appreciated as my deadline is close by.

Thank You.
Venkatagiri Vatlam

--- Last Edited by girivatlam at 2010-07-05 10:10:36 ---

--- Last Edited by girivatlam at 2010-07-05 10:26:16 ---
Attachments
fgdf

--- Last Edited by ha22109 at 2010-07-05 12:19:04 ---
Attachments
e

--- Last Edited by Venkatagiri Vatlam at 2010-07-05 12:41:56 ---


Page: 1



Please login to post a reply.



Powered by Sphene Community Tools