Retrieve all the language objects for a country.  Language objects will be annotated with
    the country and culturecode attributes when applicable.
    :param sort: code|name_en|name_native
    :return:

def get_all_languages(self, sort='code'):
    """
    Retrieve all the language objects for a country.  Language objects will be annotated with
    the country and culturecode attributes when applicable.
    :param sort: code|name_en|name_native
    :return:
    """
    langs = list(self.culturecode_set.all().as_languages())
    langs.extend(self.language_set.exclude(iso_639_1__in=[x.iso_639_1 for x in langs]))
    if sort in ['name_en', 'name_native']:
        langs.sort(key=lambda x: getattr(x, sort))
    elif sort == 'code':
        codes = self.languages.split(',')

        def code_sort(x):
            return codes.index(x.sort_code)

        langs.sort(key=code_sort)
    else:
        raise ValueError(
            'Invalid code option %s.  Valid options are: code, name_en, name_native' % sort)
    return langs