The goal of internationalization and localization is to allow a single web application to offer its content in languages and formats tailored to the audience.
Essentially, Django does two things:
Translation depends on the target language, and formatting usually depends on
the target country. This information is provided by browsers in the
Accept-Language header. However, the time zone isn’t readily available.
The words “internationalization” and “localization” often cause confusion; here’s a simplified definition:
Translation is controlled by the
USE_I18N setting. However, it
involves internationalization and localization. The name of the setting is
an unfortunate result of Django’s history.
Here are some other terms that will help us to handle a common language:
ll or a
combined language and country specification of the form
sr_Latn. The language
part is always in lowercase. The country part is in titlecase if it has
more than 2 characters, otherwise it’s in uppercase. The separator is an
Accept-Language HTTP header using this
pt-br. Language codes
are generally represented in lowercase, but the HTTP
header is case-insensitive. The separator is a dash.
.po file extension.