Posts

Showing posts with the label Internationalization

Internationalization (Language Setting) in Django

If your project want to run in English and a Spanish version edit the settings.py file of your project and add the following LANGUAGES setting to it.  Place it next to the LANGUAGE_CODE setting:                LANGUAGES = (                ('en', 'English'),                ('es', 'Spanish'),              ) The LANGUAGES setting contains two tuples that consist of a language code and a name .  Language codes can be locale-specific , such as en-us or en-gb , or generic , such as en . With this setting, we specified that application will only be available in English and Spanish.  If you don't define a custom LANGUAGES setting, the site will be available in all the languages that Django is translated into. Make your LANGUAGE_CODE setting look as follows:            ...