Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added many languages polyglossia supports.
  • Loading branch information
felixfontein committed Jan 15, 2017
1 parent 745a14d commit 20b1bdf
Showing 1 changed file with 77 additions and 17 deletions.
94 changes: 77 additions & 17 deletions v7/latex/latex/parser.py
Expand Up @@ -135,23 +135,83 @@ class ParsingEnvironment(object):
"""Environmental data for parsing, like registered commands and environments."""

languages = {
'arabic': {
'locale': 'ar',
'right_to_left': True,
},
'hebrew': {
'locale': 'he',
'right_to_left': True,
},
'english': {
'locale': 'en',
},
'german': {
'locale': 'de',
},
'greek': {
'locale': 'el',
}
'albanian': { 'locale': 'sq', },
#'amharic': { 'locale': 'am', },
'arabic': { 'locale': 'ar', 'right_to_left': True, },
'armenian': { 'locale': 'hy', },
# 'asturian': { 'locale': 'ast', },
# 'bahasai': { 'locale': '', },
# 'bahasam': { 'locale': '', },
'basque': { 'locale': 'eu', },
# 'bengali': { 'locale': 'bn', },
'brazil': { 'locale': 'pt-br', },
'brazilian': { 'locale': 'pt-br', },
'breton': { 'locale': 'br', },
'bulgarian': { 'locale': 'bg', },
'catalan': { 'locale': 'ca', },
# 'coptic': { 'locale': 'cop', },
'croatian': { 'locale': 'hr', },
'czech': { 'locale': 'cs', },
'danish': { 'locale': 'da', },
# 'divehi': { 'locale': '', },
'dutch': { 'locale': 'nl', },
'english': { 'locale': 'en', },
'esperanto': { 'locale': 'eo', },
'estonian': { 'locale': 'et', },
'farsi': { 'locale': 'fa', 'right_to_left': True, },
'finnish': { 'locale': 'fr', },
'french': { 'locale': 'fr', },
'friulan': { 'locale': 'fur', },
'galician': { 'locale': 'gl', },
'german': { 'locale': 'de', },
'greek': { 'locale': 'el', }
'hebrew': { 'locale': 'he', 'right_to_left': True, },
# 'hindi': { 'locale': 'hi', },
'icelandic': { 'locale': 'is', },
# 'interlingua': { 'locale': '', },
'irish': { 'locale': 'ga', },
'italian': { 'locale': 'it', },
# 'kannada': { 'locale': 'kn', },
# 'khmer': { 'locale': 'km', },
# 'korean': { 'locale': 'ko', },
# 'lao': { 'locale': 'lo', },
'latin': { 'locale': 'la', },
'latvian': { 'locale': 'lv', },
'lithuanian': { 'locale': 'lt', },
# 'lsorbian': { 'locale': '', },
'magyar': { 'locale': 'hu', },
# 'malayalam': { 'locale': 'ml', },
# 'marathi': { 'locale': 'mr', },
# 'nko': { 'locale': '', },
'norsk': { 'locale': 'nb', },
'nynorsk': { 'locale': 'nn', },
'occitan': { 'locale': 'oc', },
'piedmontese': { 'locale': 'pms', },
'polish': { 'locale': 'pl', },
'portuges': { 'locale': 'pt', },
'romanian': { 'locale': 'ro', },
'romansh': { 'locale': 'rm', },
'russian': { 'locale': 'ru', },
# 'samin': { 'locale': '', },
# 'sanskrit': { 'locale': 'sa', },
'scottish': { 'locale': 'sco', },
'serbian': { 'locale': 'sr', },
'slovak': { 'locale': 'sk', },
'slovenian': { 'locale': 'sl', },
'spanish': { 'locale': 'es', },
'swedish': { 'locale': 'sv', },
# 'syriac': { 'locale': 'syc', },
# 'tamil': { 'locale': 'ta', },
# 'telugu': { 'locale': 'te', },
# 'thai': { 'locale': 'th', },
# 'tibetan': { 'locale': '', },
'turkish': { 'locale': 'tr', },
'turkmen': { 'locale': 'tk', },
'ukrainian': { 'locale': 'uk', },
'urdu': { 'locale': 'ur', 'right_to_left': True, },
# 'usorbian': { 'locale': '', },
# 'vietnamese': { 'locale': 'vi', },
'welsh': { 'locale': 'cy', },
}

def __init__(self):
Expand Down

0 comments on commit 20b1bdf

Please sign in to comment.