Internationalization and localization settings

Django provides several settings for internationalization. The following settings are the most relevant ones:

  • USE_I18N: A Boolean that specifies whether Django's translation system is enabled. This is True by default.
  • USE_L10N: A Boolean indicating whether localized formatting is enabled. When active, localized formats are used to represent dates and numbers. This is False by default.
  • USE_TZ: A Boolean that specifies whether datetimes are time zone-aware. When you create a project with the startproject command, this is set to True.
  • LANGUAGE_CODE: The default language code for the project. This is in standard language ID format, for example, 'en-us' for American English, or 'en-gb' for British ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.