Skip to content

Commit

Permalink
Merge pull request #153 from assistent-cat/fix-catalan-owm-lang
Browse files Browse the repository at this point in the history
Fix OWM language selection
  • Loading branch information
krisgesling committed Feb 12, 2021
2 parents 2ef5eea + 8708f8a commit 642ce6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ def get_language(lang):
'es', 'tr', 'ua', 'vi']

if lang[0] in owmsupported:
owmlang = lang[0]
return lang[0]

if (len(lang) == 2):
if lang[1] in owmsupported:
owmlang = lang[1]
return lang[1]
return owmlang

def build_query(self, params):
Expand Down

0 comments on commit 642ce6f

Please sign in to comment.