On languages list
541156
public function onLanguagesList()
    {
        $this->breadcrumbs->register('translations', function($breadcrumbs) {
            $breadcrumbs->push('Translations', handles('antares::translations/index/' . area()), ['force_link' => true]);
        });

        $this->shareOnView('translations');
    }
920668
def get_languages(self):
        
        languages = ['python']
        all_options = CONF.options(self.CONF_SECTION)
        for option in all_options:
            if option in [l.lower() for l in LSP_LANGUAGES]:
                languages.append(option)
        return languages
954156
def get_language_tabs(self):
        
        current_language = self.get_current_language()
        if self.object:
            available_languages = list(self.object.get_available_languages())
        else:
            available_languages = []

        return get_language_tabs(self.request, current_language, available_languages)
497450
def get_reviewable_topics(self, lang):
        """"""
        return [topic['title']
                for topic in self.user_data.language_data[lang]['skills']
                if topic['learned'] and topic['strength'] < 1.0]
1269587
public function index()
    {
        $this->loadModel('Locale.Languages');
        $languages = $this->Languages
            ->find()
            ->order(['ordering' => 'ASC'])
            ->all();

        $this->title(__d('locale', 'Languages List'));
        $this->set('languages', $languages);
        $this->Breadcrumb->push('/admin/locale');
    }
277315
protected function _languages()
    {
        if (!empty($this->params['languages'])) {
            $this->_languages = explode(',', $this->params['languages']);

            return;
        }

        $langs = Configure::read('I18n.languages');
        if (empty($langs)) {
            return;
        }

        $this->_languages = [];
        $langs = Hash::normalize($langs);
        foreach ($langs as $key => $value) {
            if (isset($value['locale'])) {
                $this->_languages[] = $value['locale'];
            } else {
                $this->_languages[] = $key;
            }
        }
    }
8079
def _get_languages(cls) -> set:
        """"""
        if not cls._server_is_alive():
            cls._start_server_on_free_port()
        url = urllib.parse.urljoin(cls._url, 'Languages')
        languages = set()
        for e in cls._get_root(url, num_tries=1):
            languages.add(e.get('abbr'))
            languages.add(e.get('abbrWithVariant'))
        return languages
1100669
def listing_for_language(language)
      ensure_active_edit!

      begin
        result = client.get_listing(
          current_package_name,
          current_edit.id,
          language
        )

        return Listing.new(self, language, result)
      rescue Google::Apis::ClientError => e
        return Listing.new(self, language) if e.status_code == 404 # create a new empty listing
        raise
      end
    end
1161034
public function listLanguages(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/languages', $this->getOwner(),
            $this->getRepo()));
    }
26778
def user_preferred_languages
      return [] if header.to_s.strip.empty?
      @user_preferred_languages ||= begin
        header.to_s.gsub(/\s+/, '').split(',').map do |language|
          locale, quality = language.split(';q=')
          raise ArgumentError, 'Not correctly formatted' unless locale =~ /^[a-z\-0-9]+|\*$/i

          locale  = locale.downcase.gsub(/-[a-z0-9]+$/i, &:upcase) # Uppercase territory
          locale  = nil if locale == '*' # Ignore wildcards

          quality = quality ? quality.to_f : 1.0

          [locale, quality]
        end.sort do |(_, left), (_, right)|
          right <=> left
        end.map(&:first).compact
      rescue ArgumentError # Just rescue anything if the browser messed up badly.
        []
      end
    end
987771
function I18n(languageList, defaultLanguage) {
    this.store = appendLanguage({}, languageList);
    this.setLanguage(
        defaultLanguage
        || typeof navigator !== 'undefined' && navigator.language.toLowerCase()
        || 'en-us'
    );
}
757924
def get_users_indexed_by_lang():
        
        result = {}
        users = TransUser.objects.filter(active=True).select_related('user')
        for user in users:
            for lang in user.languages.all():
                if lang.code not in result:
                    result[lang.code] = set()
                result[lang.code].add(user)
        return result
1348151
public function getLanguages($refresh = false)
    {
        if (empty($this->detection['acceptLanguage']) || $refresh) {
            $this->detectLanguage($this->acceptLanguage);
        }

        return $this->languages;
    }
526160
function scan(language) {
            var i;
            for (i = 0; i < availableLanguages.length; i += 1) {
                if (language.toLowerCase() === availableLanguages[i].toLowerCase()) {
                    return availableLanguages[i];
                }
            }
        }
1338897
def all_languages_column(self, object):
        
        all_languages = [code for code, __ in settings.LANGUAGES]
        return mark_safe(
            self._languages_column(
                object, all_languages, span_classes='all-languages'
            )
        )
91437
public function onTranslationList()
    {
        $this->breadcrumbs->register('translations', function($breadcrumbs) {
            $breadcrumbs->push('Translations', handles('antares::translations/index/' . area()));
        });

        $this->shareOnView('translations');
    }
1347755
def show_list_translations(context, item):
    
    if not item:
        return

    manager = Manager()
    manager.set_master(item)

    ct_item = ContentType.objects.get_for_model(item)

    item_language_codes = manager.get_languages_from_item(ct_item, item)
    model_language_codes = manager.get_languages_from_model(ct_item.app_label, ct_item.model)

    item_languages = [{'lang': lang, 'from_model': lang.code in model_language_codes}
                      for lang in TransLanguage.objects.filter(code__in=item_language_codes).order_by('name')]

    more_languages = [{'lang': lang, 'from_model': lang.code in model_language_codes}
                      for lang in TransLanguage.objects.exclude(main_language=True).order_by('name')]

    return render_to_string('languages/translation_language_selector.html', {
        'item_languages': item_languages,
        'more_languages': more_languages,
        'api_url': TM_API_URL,
        'app_label': manager.app_label,
        'model': manager.model_label,
        'object_pk': item.pk
    })