Mercurial > kallithea
diff docs/setup.rst @ 8095:7c7d6b5c07c7 stable
i18n: make sure 'en' in Accept-Language is recognized as having 100% coverage - i18n.lang is for source language
https://github.com/cdent/paste/blob/3.2.3/paste/wsgiwrappers.py#L89 describes
how paste solved the problem. TG solves the same problem (with less
explanation) in
https://github.com/TurboGears/tg2/blob/tg2.4.2/tg/request_local.py#L36 with
fallback language specified in i18n.lang .
Thus, clarify the use of i18n.lang (refining f2f7a8c1281e and 8931078f70db) and
set 'en' as default value on app startup.
TurboGears requires an (empty) translation for the source language which is
default for i18n.lang . The empty .mo for en is created as the 4 magic .mo
bytes followed by lengths of 0:
printf '\x95\x04\x12\xde\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' > kallithea/i18n/en/LC_MESSAGES/kallithea.mo
Based on report and analysis by Wolfgang Scherer. Also discussed upstream on
https://github.com/TurboGears/tg2/pull/115 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 05 Jan 2020 01:19:05 +0100 |
parents | 488b52cad890 |
children | 89e9aef9b983 |
line wrap: on
line diff
--- a/docs/setup.rst Mon Dec 30 01:02:36 2019 +0100 +++ b/docs/setup.rst Sun Jan 05 01:19:05 2020 +0100 @@ -80,13 +80,12 @@ language, as indicated by the browser. Thus, different users may see the application in different languages. If the requested language is not available (because the translation file for that language does not yet exist or is -incomplete), the language specified in setting ``i18n.lang`` in the Kallithea -configuration file is used as fallback. If no fallback language is explicitly -specified, English is used. +incomplete), English is used. If you want to disable automatic language detection and instead configure a fixed language regardless of user preference, set ``i18n.enabled = false`` and -set ``i18n.lang`` to the desired language (or leave empty for English). +specify another language by setting ``i18n.lang`` in the Kallithea +configuration file. Using Kallithea with SSH