def bigml_locale(locale_alias):
    language_code = locale_alias.lower()[0:2]
    if language_code not in LOCALE_SYNONYMS:
        return None
    alternatives = LOCALE_SYNONYMS[language_code]
    if isinstance(alternatives[0], basestring):
        return (alternatives[0] if locale_alias in alternatives
                else None)
    else:
        result = None
        for subgroup in alternatives:
            if locale_alias in subgroup:
                result = subgroup[0]
                break
        return result
Gets input from the command line and validates it.
dataset/ETHPy150Open bigmlcom/python/bigml/util.py/bigml_locale--crossover with--dataset/ETHPy150Open jart/fabulous/fabulous/prompt.py/input_object