Polaris currently supports English, Portuguese and Indonesian. Note that this feature depends on the GNU gettext library. This page assumes you understand how translations work in Django.

If you’d like to add support for another language, make a pull request to Polaris with the necessary translation files. If Polaris supports the language you wish to provide, make sure the text content rendered from your app supports translation to that language.

To enable this support, add the following to your

from django.utils.translation import gettext_lazy as _

USE_I18N = True
USE_L10N = True
LANGUAGES = [("en", _("English")), ("pt", _("Portuguese")), ("id", _("Bahasa Indonesia"))]

Note that adding the LANGUAGE setting is required. Without this, Django assumes your application supports every language Django itself supports.

You must also add django.middleware.locale.LocaleMiddleware to your settings.MIDDLEWARE after SessionMiddleware:


Once your project is configured to support translations, compile the translation files:

python compilemessages

Finally, configure your browser to use the targeted language. You should then see the translated text.