'Return a list of language codes for which we have transcripts.
Args:
verify_assets (boolean): If True, checks to ensure that the transcripts
really exist in the contentstore. If False, we just look at the
VideoDescriptor fields and do not query the contentstore. One reason
we might do this is to avoid slamming contentstore() with queries
when trying to make a listing of videos and their languages.
Defaults to True.
transcripts (dict): A dict with all transcripts and a sub.
Defaults to False'

def available_translations(self, transcripts, verify_assets=True):

    translations = []
    (sub, other_langs) = (transcripts['sub'], transcripts['transcripts'])
    if (not verify_assets):
        if other_langs:
            translations = list(other_langs)
        if ((not translations) or sub):
            translations += ['en']
        return translations
    if sub:
        try:
            Transcript.asset(self.location, sub, 'en')
        except NotFoundError:
            try:
                Transcript.asset(self.location, None, None, sub)
            except NotFoundError:
                pass
            else:
                translations += ['en']
        else:
            translations += ['en']
    for lang in other_langs:
        try:
            Transcript.asset(self.location, None, None, other_langs[lang])
        except NotFoundError:
            continue
        translations += [lang]
    return translations
