trans_pdf.get_avai lable_languages(auto_trans: bool=False)

Obtains a list of all supported languages and their codes e.g. en-us.


When True, the list of languages is obtained from the 3rd party responsible for performing the translation (Microsoft at the time of writing). This list is shorter than the standard built-in list and should be used if you intend to auto-translate a PDF.


A list of dictionaries. Each dictionary contains contains various fields describing the language such as name, variation and abbreviation code. When passing language codes back to the API, use the 'lang_code' entry.

Example entries:

{'lang_name': 'Tahitian', 'lang_id': 6, 'variation': '', 'lang_code': 'ty', 'nativeName': 'Tahitian', 'language': 'Tahitian'},

{'lang_name': 'বাংলা', 'lang_id': 7, 'variation': '', 'lang_code': 'bn', 'nativeName': 'বাংলা', 'language': 'Bangla'},

{'lang_name': 'English', 'lang_id': 8, 'variation': '', 'lang_code': 'en', 'nativeName': 'English', 'language': 'English'},

{'lang_name': '简体中文', 'lang_id': 9, 'variation': 'hans', 'lang_code': 'zh-hans', 'nativeName': '简体中文', 'language': 'Chinese Simplified'}, {'lang_name': 'Tiếng Việt', 'lang_id': 10, 'variation': '', 'lang_code': 'vi', 'nativeName': 'Tiếng Việt', 'language': 'Vietnamese'}