Added Lang option

This commit is contained in:
xuezhixin 2021-12-02 00:01:39 +08:00
parent 5f9544b3b3
commit 35e4ee7286
1 changed files with 3 additions and 3 deletions

View File

@ -106,9 +106,9 @@ def manual_lookup():
target = language
break
elif 'LANG' in os.environ:
languages = os.environ['LANG'].split('.')
for language in languages:
if language in available_languages:
language = os.environ['LANG'].split('.')[0]
for i in range(len(available_languages)):
if language == available_languages[i]:
target = language
break
return base_url % target