diff --git a/docs/configuration/system.md b/docs/configuration/system.md index 9df22165c..a1e0ebb17 100644 --- a/docs/configuration/system.md +++ b/docs/configuration/system.md @@ -62,14 +62,6 @@ Email is sent from NetBox only for critical events or if configured for [logging --- -## ENABLE_TRANSLATION - -Default: True - -Enables language translation for the user interface. (This parameter maps to Django's [USE_I18N](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_I18N) setting.) - ---- - ## HTTP_PROXIES Default: None @@ -206,3 +198,11 @@ If `STORAGE_BACKEND` is not defined, this setting will be ignored. Default: UTC The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + +--- + +## TRANSLATION_ENABLED + +Default: True + +Enables language translation for the user interface. (This parameter maps to Django's [USE_I18N](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_I18N) setting.) diff --git a/netbox/netbox/preferences.py b/netbox/netbox/preferences.py index 2d82af974..d911aabb0 100644 --- a/netbox/netbox/preferences.py +++ b/netbox/netbox/preferences.py @@ -34,7 +34,7 @@ PREFERENCES = { description=_('Forces UI translation to the specified language'), warning=( _("Support for translation has been disabled locally") - if not settings.ENABLE_TRANSLATION + if not settings.TRANSLATION_ENABLED else '' ) ), diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 2dc4a36e1..4e9bf9c00 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -92,7 +92,6 @@ DEVELOPER = getattr(configuration, 'DEVELOPER', False) DJANGO_ADMIN_ENABLED = getattr(configuration, 'DJANGO_ADMIN_ENABLED', False) DOCS_ROOT = getattr(configuration, 'DOCS_ROOT', os.path.join(os.path.dirname(BASE_DIR), 'docs')) EMAIL = getattr(configuration, 'EMAIL', {}) -ENABLE_TRANSLATION = getattr(configuration, 'ENABLE_TRANSLATION', True) EVENTS_PIPELINE = getattr(configuration, 'EVENTS_PIPELINE', ( 'extras.events.process_event_queue', )) @@ -157,6 +156,7 @@ SESSION_FILE_PATH = getattr(configuration, 'SESSION_FILE_PATH', None) STORAGE_BACKEND = getattr(configuration, 'STORAGE_BACKEND', None) STORAGE_CONFIG = getattr(configuration, 'STORAGE_CONFIG', {}) TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC') +TRANSLATION_ENABLED = getattr(configuration, 'TRANSLATION_ENABLED', True) # Load any dynamic configuration parameters which have been hard-coded in the configuration file for param in CONFIG_PARAMS: @@ -447,7 +447,7 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}' USE_TZ = True # Toggle language translation support -USE_I18N = ENABLE_TRANSLATION +USE_I18N = TRANSLATION_ENABLED # WSGI WSGI_APPLICATION = 'netbox.wsgi.application'