def get_language_code(lang_code, feature_database):
# first, normalize to an ISO 639-3 code
if lang_code in LETTER_CODES:
lang_code = LETTER_CODES[lang_code]
if lang_code not in feature_database["langs"]:
print("ERROR: Language " + lang_code + " not found.", file=sys.stderr)
sys.exit(2)
return lang_code
评论列表
文章目录