def to_locale(language, to_lower=False):
    p = language.find('-')
    if p >= 0:
        if to_lower:
            return language[:p].lower()+'_'+language[p+1:].lower()
        else:
            return language[:p].lower()+'_'+language[p+1:].upper()
    else:
        return language.lower()
import the transcript set.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/utils/translation/trans_real.py/to_locale--crossover with--dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_kamilah.py/importTranscripts