Get list of languages.
320181
def get_languages(self):
        """"""
        if self._languages_cache is None:
            self._languages_cache = list(self.iter_languages())
        return self._languages_cache
791626
def multilingual(request):
    
    codes = sorted(get_language_code_list())
    return {'LANGUAGE_CODES': codes,
            'LANGUAGE_CODES_AND_NAMES': [(c, LANG_DICT.get(c, c)) for c in codes], 
            'DEFAULT_LANGUAGE_CODE': get_default_language_code(),
            'ADMIN_MEDIA_URL': settings.ADMIN_MEDIA_PREFIX}
1290385
def languages(self):
        
        languages = []

        for language in self.cache['languages']:
            language = Structure(
                id = language['id'],
                name = language['name']
            )

            languages.append(language)

        return languages
51946
def available_languages(self):
        
        available_languages = getattr(self, '_available_languages', None)
        if available_languages:
            return available_languages
        try:
            languages = os.listdir(self.data_directory)
        except OSError:
            raise StopWordError(
                "'datas' directory is unreadable, check your installation.")
        languages = sorted(map(lambda x: x.replace('.txt', ''), languages))
        setattr(self, '_available_languages', languages)
        return languages
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)
702057
def get_avaliable_languages(self, bundleId):
        """"""
        bundleData = self.__get_bundle_data(bundleId)

        if not bundleData:
            return []

        sourceLanguage = bundleData.get(self.__RESPONSE_SRC_LANGUAGE_KEY)
        languages = bundleData.get(self.__RESPONSE_TARGET_LANGUAGES_KEY)
        languages.append(sourceLanguage)

        return languages if languages else []
1164508
function getLanguages(options) {
  options.hash = _private.getDevHash(options.secret);
  return _private.makeRequest(_getLink(options), 'Unable to fetch project languages');
}
942467
public function getAllLangs(): array
    {
        $domainInfo = $this->intuition->getDomainInfo($this->domain);
        $messageFiles = glob($domainInfo['dir'].'/*.json');
        $languages = array_values(array_unique(array_map(
            function ($filename) {
                return basename($filename, '.json');
            },
            $messageFiles
        )));
        $availableLanguages = [];
        foreach ($languages as $lang) {
            $availableLanguages[$lang] = $this->intuition->getLangName($lang);
        }
        ksort($availableLanguages);
        return $availableLanguages;
    }
876567
def collect_translations(self):
        """"""
        languages = {}
        locale_data = {}

        for language_code, label in settings.LANGUAGES:
            languages[language_code] = '%s' % label

            # Create django translation engine for `language_code`
            trans_cat, trans_fallback_cat = self.get_catalog(language_code)

            # Add the meta object
            locale_data[language_code] = {}
            locale_data[language_code][""] = self.make_header(language_code, trans_cat)
            num_plurals = self._num_plurals(trans_cat)

            # Next code is largely taken from Django@master (01.10.2017) from `django.views.i18n JavaScriptCatalogue`
            pdict = {}
            seen_keys = set()

            for key, value in itertools.chain(six.iteritems(trans_cat), six.iteritems(trans_fallback_cat)):
                if key == '' or key in seen_keys:
                    continue

                if isinstance(key, six.string_types):
                    locale_data[language_code][key] = [value]

                elif isinstance(key, tuple):
                    msgid, cnt = key
                    pdict.setdefault(msgid, {})[cnt] = value

                else:
                    raise TypeError(key)
                seen_keys.add(key)

            for k, v in pdict.items():
                locale_data[language_code][k] = [v.get(i, '') for i in range(num_plurals)]

        for key, value in locale_data.items():
            locale_data[key] = json.dumps(value)

        return languages, locale_data
804331
def get_languages_from_application(app_label):
        
        try:
            mod_lan = TransApplicationLanguage.objects.filter(application=app_label).get()
            languages = [lang.code for lang in mod_lan.languages.all()]
            return languages
        except TransApplicationLanguage.DoesNotExist:
            return []
630682
public function getLanguages()
    {
        if ($this->_languages === null) {
            $this->_languages = (new DbQuery())->select(['short_code', 'id'])->indexBy('short_code')->from('admin_lang')->all();
        }

        return $this->_languages;
    }
1010820
def language(self):
        """"""
        try:
            return self._language
        except AttributeError:
            self._language = find_language(self, getattr(self, 'exts', None))
        return self._language
1354591
def get_language_details(self, language):
        """"""
        for lang in self.user_data.languages:
            if language == lang['language_string']:
                return lang

        return {}
947224
def languages(self):
        
        language = PageView.headers['Accept-Language']
        first_language = fn.SubStr(
            language,  # String to slice.
            1,  # Left index.
            fn.StrPos(language, ';'))
        return (self.get_query()
                .select(first_language, fn.Count(PageView.id))
                .group_by(first_language)
                .order_by(fn.Count(PageView.id).desc())
                .tuples())
1047560
public function getLanguages()
    {
        $url = $this->getGetLanguagesUrl();
        $response = $this->sendRequest(
            'GET',
            $url,
            [
                'version' => $this->serviceProtocolVersion
            ]
        );
        if ($response->getStatusCode() === 200) {
            $languages = $this->parseGetLanguagesResponse($response);
            return $languages;
        }
        return false;
    }
1348151
public function getLanguages($refresh = false)
    {
        if (empty($this->detection['acceptLanguage']) || $refresh) {
            $this->detectLanguage($this->acceptLanguage);
        }

        return $this->languages;
    }
572456
def get_language_from_abbr(self, abbr):
        """"""
        for language in self.user_data.languages:
            if language['language'] == abbr:
                return language['language_string']
        return None