From 550f70b1aabd377ace73a011024eaa4ea13ffab4 Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Fri, 6 May 2022 09:40:45 +0000 Subject: Add support for the Silesian language --- searx/webapp.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'searx/webapp.py') diff --git a/searx/webapp.py b/searx/webapp.py index 648a49ebe..3d3f736a5 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -220,6 +220,9 @@ def _get_translations(): if has_request_context() and request.form.get('use-translation') == 'oc': babel_ext = flask_babel.current_app.extensions['babel'] return Translations.load(next(babel_ext.translation_directories), 'oc') + if has_request_context() and request.form.get('use-translation') == 'szl': + babel_ext = flask_babel.current_app.extensions['babel'] + return Translations.load(next(babel_ext.translation_directories), 'szl') return _flask_babel_get_translations() @@ -238,6 +241,9 @@ def get_locale(): if locale == 'oc': request.form['use-translation'] = 'oc' locale = 'fr_FR' + if locale == 'szl': + request.form['use-translation'] = 'szl' + locale = 'pl' if locale == '': # if there is an error loading the preferences # the locale is going to be '' -- cgit v1.2.3-54-g00ecf