Locales

Initialize LOCALE_NAMES, UI_LOCALE_CODES and RTL_LOCALES.

searx.locales.LOCALE_NAMES = {'ar': 'العربية (Arabic)', 'bg': 'Български (Bulgarian)', 'bo': 'བོད་སྐད་ (Tibetan)', 'ca': 'Català (Catalan)', 'cs': 'Čeština (Czech)', 'cy': 'Cymraeg (Welsh)', 'da': 'Dansk (Danish)', 'de': 'Deutsch (German)', 'el_GR': 'Ελληνικά, Ελλάδα (Greek, Greece)', 'en': 'English', 'eo': 'Esperanto', 'es': 'Español (Spanish)', 'et': 'Eesti (Estonian)', 'eu': 'Euskara (Basque)', 'fa_IR': 'فارسی, ایران (Persian, Iran)', 'fi': 'Suomi (Finnish)', 'fil': 'Filipino', 'fr': 'Français (French)', 'gl': 'Galego (Galician)', 'he': 'עברית (Hebrew)', 'hr': 'Hrvatski (Croatian)', 'hu': 'Magyar (Hungarian)', 'ia': 'Interlingua', 'it': 'Italiano (Italian)', 'ja': '日本語 (Japanese)', 'lt': 'Lietuvių (Lithuanian)', 'nb_NO': 'Norsk bokmål, Norge (Norwegian bokmål, Norway)', 'nl': 'Nederlands (Dutch)', 'nl_BE': 'Vlaams (Dutch, Belgium)', 'oc': 'Occitan', 'pl': 'Polski (Polish)', 'pt': 'Português (Portuguese)', 'pt_BR': 'Português, Brasil (Portuguese, Brazil)', 'ro': 'Română (Romanian)', 'ru': 'Русский (Russian)', 'sk': 'Slovenčina (Slovak)', 'sl': 'Slovenščina (Slovenian)', 'sr': 'Српски (Serbian)', 'sv': 'Svenska (Swedish)', 'ta': 'தமிழ் (Tamil)', 'te': 'తెలుగు (Telugu)', 'tr': 'Türkçe (Turkish)', 'uk': 'Українська (Ukrainian)', 'vi': 'Tiếng việt (Vietnamese)', 'zh_CN': '中文, 中国 (Chinese, China)', 'zh_TW': '中文, 台灣 (Chinese, Taiwan)'}

Mapping of locales and their description. Locales e.g. ‘fr’ or ‘pt_BR’ (delimiter is underline ‘_’)

searx.locales.RTL_LOCALES: Set[str] = {'ar', 'fa_IR', 'he'}

List of Right-To-Left locales e.g. ‘he’ or ‘fa_IR’ (delimiter is underline ‘_’)

searx.locales.UI_LOCALE_CODES: List[str] = ['oc', 'nl-BE', 'ar', 'bg', 'bo', 'ca', 'cs', 'cy', 'da', 'de', 'el-GR', 'en', 'eo', 'es', 'et', 'eu', 'fa-IR', 'fi', 'fil', 'fr', 'gl', 'he', 'hr', 'hu', 'ia', 'it', 'ja', 'lt', 'nb-NO', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'ta', 'te', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW']

List of locales e.g. ‘fr’ or ‘pt-BR’ (delimiter is ‘-‘)

searx.locales.initialize_locales(directory)[source]

Initialize global names LOCALE_NAMES, UI_LOCALE_CODES and RTL_LOCALES.