Skip to content

Commit

Permalink
Removed unused get_iso_language.
Browse files Browse the repository at this point in the history
  • Loading branch information
gryf committed Mar 24, 2021
1 parent 2371a5a commit 1492b2c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ebook_converter/utils/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ def is_rtl():
return get_lang()[:2].lower() in {'he', 'ar'}


_lang_trans = None


lcdata = {'abday': ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'),
'abmon': ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec'),
Expand Down Expand Up @@ -85,18 +82,6 @@ def _load_iso639():
return _iso639


def get_iso_language(lang_trans, lang):
iso639 = _load_iso639()
ans = lang
lang = lang.split('_')[0].lower()
if len(lang) == 2:
ans = iso639['by_2'].get(lang, ans)
elif len(lang) == 3:
if lang in iso639['by_3']:
ans = iso639['by_3'][lang]
return lang_trans(ans)


def langcode_to_name(lc, localize=True):
iso639 = _load_iso639()
try:
Expand Down

0 comments on commit 1492b2c

Please sign in to comment.