Ejemplo n.º 1
0
def convert_to_two_letter_code(lc):
    if len(lc) == 2:
        return lc

    lang = langs_by_code.get(lc)
    if lang:
        return lang['two']
    return lc
Ejemplo n.º 2
0
def convert_to_two_letter_code(lc):
    if len(lc) == 2:
        return lc

    lang = langs_by_code.get(lc)
    if lang:
        return lang['two']
    return lc