Merge "Language selection in config"

This commit is contained in:
Zuul
2025-08-15 01:53:09 +00:00
committed by Gerrit Code Review
2 changed files with 60 additions and 0 deletions

View File

@@ -472,6 +472,40 @@ This can be either a literal URL path (such as the default), or Python's
dotted string notation representing a function which will evaluate what URL
a user should be redirected to based on the attributes of that user.
LANGUAGE
--------
Default: ``all languages with translation catalogs are enabled``
If you would like to enable a specific set of languages, you can do this
by setting LANGUAGES list below. Each entry is a tuple of language code
and language name.
.. code-block:: python
LANGUAGES = (
('cs', 'Czech'),
('de', 'German'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('fr', 'French'),
('id', 'Indonesian'),
('it', 'Italian'),
('ja', 'Japanese'),
('ko', 'Korean (Korea)'),
('pl', 'Polish'),
('pt-br', 'Portuguese (Brazil)'),
('ru', 'Russian'),
('tr', 'Turkish'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese'),
)
MESSAGES_PATH
-------------

View File

@@ -133,6 +133,32 @@ TIME_ZONE = "UTC"
# ('example', 'Example', 'themes/example'),
#]
# By default all languages with translation catalogs are enabled.
# If you would like to enable a specific set of languages,
# you can do this by setting LANGUAGES list below.
# Each entry is a tuple of language code and language name.
#LANGUAGES = (
# ('cs', 'Czech'),
# ('de', 'German'),
# ('en', 'English'),
# ('en-au', 'Australian English'),
# ('en-gb', 'British English'),
# ('eo', 'Esperanto'),
# ('es', 'Spanish'),
# ('fr', 'French'),
# ('id', 'Indonesian'),
# ('it', 'Italian'),
# ('ja', 'Japanese'),
# ('ko', 'Korean (Korea)'),
# ('pl', 'Polish'),
# ('pt-br', 'Portuguese (Brazil)'),
# ('ru', 'Russian'),
# ('tr', 'Turkish'),
# ('zh-hans', 'Simplified Chinese'),
# ('zh-hant', 'Traditional Chinese'),
#)
LOGGING = {
'version': 1,
# When set to True this will disable all logging except