mirror of
https://github.com/searxng/searxng.git
synced 2026-09-12 09:16:06 +00:00
@@ -19,13 +19,14 @@ from searx import logger
|
||||
|
||||
logger = logger.getChild('locales')
|
||||
|
||||
LANGUAGES_FILE = pathlib.Path(__file__).parent / 'languages.py'
|
||||
|
||||
# safe before monkey patching flask_babel.get_translations
|
||||
_flask_babel_get_translations = flask_babel.get_translations
|
||||
|
||||
LOCALE_NAMES = {}
|
||||
"""Mapping of locales and their description. Locales e.g. 'fr' or 'pt-BR' (see
|
||||
:py:obj:`locales_initialize`)."""
|
||||
"""Mapping of locales and their description. Locales e.g. ``fr`` or ``pt-BR``
|
||||
(see :py:obj:`locales_initialize`)."""
|
||||
|
||||
RTL_LOCALES: Set[str] = set()
|
||||
"""List of *Right-To-Left* locales e.g. 'he' or 'fa-IR' (see
|
||||
@@ -161,6 +162,8 @@ def get_engine_locale(searxng_locale, engine_locales, default=None):
|
||||
Argument ``engine_locales`` is a python dict that maps *SearXNG locales* to
|
||||
corresponding *engine locales*:
|
||||
|
||||
.. code:: python
|
||||
|
||||
<engine>: {
|
||||
# SearXNG string : engine-string
|
||||
'ca-ES' : 'ca_ES',
|
||||
|
||||
Reference in New Issue
Block a user