Lang in os.environ is used as an alternative

This commit is contained in:
xuezhixin 2021-12-01 21:32:49 +08:00
parent a21575b0ab
commit 5f9544b3b3
1 changed files with 6 additions and 1 deletions

View File

@ -105,7 +105,12 @@ def manual_lookup():
if language in available_languages:
target = language
break
elif 'LANG' in os.environ:
languages = os.environ['LANG'].split('.')
for language in languages:
if language in available_languages:
target = language
break
return base_url % target
def path_lookup(command):