Skip to content

Commit

Permalink
Complete language codes list (#1197)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGaroo committed Dec 20, 2021
1 parent 1621394 commit 0401c53
Showing 1 changed file with 63 additions and 2 deletions.
65 changes: 63 additions & 2 deletions cmscontrib/loaders/polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Copyright © 2014-2017 Stefano Maggiolo <[email protected]>
# Copyright © 2018 Edoardo Morassutto <[email protected]>
# Copyright © 2018 Luca Wehrstedt <[email protected]>
# Copyright © 2021 Grace Hawkins <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -40,8 +41,68 @@ def make_timedelta(t):
return timedelta(seconds=t)


# TODO: add all languages.
LANGUAGE_MAP = {'english': 'en', 'russian': 'ru', 'italian': 'it'}
LANGUAGE_MAP = {
'afrikaans': 'af',
'arabic': 'ar',
'armenian': 'hy',
'azerbaijani': 'az',
'belarusian': 'be',
'bengali': 'bn',
'bosnian': 'bs',
'bulgarian': 'bg',
'catalan': 'ca',
'chinese': 'zh',
'croatian': 'hr',
'czech': 'cs',
'danish': 'da',
'dutch': 'nl',
'english': 'en',
'estonian': 'et',
'filipino': 'fil',
'finnish': 'fi',
'french': 'fr',
'georgian': 'ka',
'german': 'de',
'greek': 'el',
'hebrew': 'he',
'hindi': 'hi',
'hungarian': 'hu',
'icelandic': 'is',
'indonesian': 'id',
'irish': 'ga',
'italian': 'it',
'japanese': 'ja',
'kazakh': 'kk',
'korean': 'ko',
'kyrgyz': 'ky',
'latvian': 'lv',
'lithuanian': 'lt',
'macedonian': 'mk',
'malay': 'ms',
'mongolian': 'mn',
'norwegian': 'no',
'persian': 'fa',
'polish': 'pl',
'portuguese': 'pt',
'romanian': 'ro',
'russian': 'ru',
'serbian': 'sr',
'sinhala': 'si',
'slovak': 'sk',
'slovene': 'sl',
'spanish': 'es',
'swedish': 'sv',
'tajik': 'tg',
'tamil': 'ta',
'thai': 'th',
'turkish': 'tr',
'turkmen': 'tk',
'ukrainian': 'uk',
'urdu': 'ur',
'uzbek': 'uz',
'vietnamese': 'vi',
'other': 'other',
}


class PolygonTaskLoader(TaskLoader):
Expand Down

0 comments on commit 0401c53

Please sign in to comment.