Languages.

        Returns a set of languages in lower-case.

        :return:
            Returns a set of languages in lower-case (strings).
481993
def languages(self):
        
        result = set()
        languages = self._safe_get_element('ItemAttributes.Languages')
        if languages is not None:
            for language in languages.iterchildren():
                text = self._safe_get_element_text('Name', language)
                if text:
                    result.add(text.lower())
        return result
917910
def get_language_ids(self):
        '''
        
        '''
        languages = list_of_objects_from_api(self.language_url)

        language_ids = []
        for language in languages:
            language_ids.append(language["id"])
        return language_ids
522137
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:
            # Get correct locale for sr-latn
            if len(language[p + 1:]) > 2:
                locale = language[:p].lower() + '_' + language[p + 1].upper()
                return locale + language[p + 2:].lower()
            return language[:p].lower() + '_' + language[p + 1:].upper()
    else:
        return language.lower()
1178604
public Set<String> getLanguages() {
        Set<String> result = new HashSet<String>();
        for (QueryParser parser : parsers.values()) {
            result.add(parser.getLanguage());
        }
        return Collections.unmodifiableSet(result);
    }
464832
def get_language(self):
        
        return get_language_parameter(self.request, self.query_language_key, default=self.get_default_language(object=object))
1286518
def get_language_database():
    '''
    
    '''
    lang = None
    language = get_language()
    if language:
        for x in settings.LANGUAGES_DATABASES:
            if x.upper() == language.upper():
                lang = language
                break

    if lang is None:
        lang = settings.LANGUAGES_DATABASES[0]
    return lang.lower()
1281136
def get_languages(self):
        
        if self._languages:
            return self._languages
        self._languages = cache.get(self.PAGE_LANGUAGES_KEY % (self.pk))
        if self._languages is not None:
            return self._languages

        languages = [c['language'] for
            c in Content.objects.filter(page=self,
            type="slug").values('language')]
        # remove duplicates
        languages = sorted(set(languages))
        cache.set(self.PAGE_LANGUAGES_KEY % (self.pk), languages)
        self._languages = languages
        return languages
817404
public function getLanguages()
    {
        $source = $this->server['HTTP_ACCEPT_LANGUAGE'];

        if (strpos($source, ',') !== false) {
            $langs = explode(',', $source);
            return $langs;
        } else {
            return array($source);
        }
    }
220136
def available_languages(self):
        
        from .models import Translation

        return (
            Translation.objects.filter(
                identifier=self.linguist_identifier, object_id=self.pk
            )
            .values_list("language", flat=True)
            .distinct()
            .order_by("language")
        )
1177970
def compatible_language_from(available_languages)
      user_preferred_languages.map do |preferred| #en-US
        preferred = preferred.downcase
        preferred_language = preferred.split('-', 2).first

        available_languages.find do |available| # en
          available = available.to_s.downcase
          preferred == available || preferred_language == available.split('-', 2).first
        end
      end.compact.first
    end
1221323
def get_language():
    
    lang = _get_language()

    if not lang:
        return get_fallback_language()

    langs = [l[0] for l in settings.SUPPORTED_LANGUAGES]
    if lang not in langs and "-" in lang:
        lang = lang.split("-")[0]

    if lang in langs:
        return lang

    return settings.DEFAULT_LANGUAGE
1120139
def get_all_languages(self, sort='code'):
    
    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
874634
private List<String> listToLowerCase(List<String> l)
	{
		List<String> result = new ArrayList<String>();
		for (String s : l)
		{
			result.add(s.toLowerCase());
		}
		return result;
	}
34070
def all_languages():
    """"""

    rv = []

    for lang in os.listdir(localedir):
        base = lang.split('_')[0].split('.')[0].split('@')[0]
        if 2 <= len(base) <= 3 and all(c.islower() for c in base):
            if base != 'all':
                rv.append(lang)
    rv.sort()
    rv.append('en')
    l10n_log('Registered languages:', rv, lvl=verbose)

    return rv
771428
def get_languages(self, abbreviations=False):
        
        data = []

        for lang in self.user_data.languages:
            if lang['learning']:
                if abbreviations:
                    data.append(lang['language'])
                else:
                    data.append(lang['language_string'])

        return data
1317056
def get_languages(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/languages"
        )
        return data
41316
def get_languages(self):
        

        raw_response = requests_util.run_request('get', self.API_BASE_URL + '/languages',
                                                 headers=self.__get_header_with_auth())

        return self.parse_raw_response(raw_response)