Set the default language for all objects returned with this
        query.
160690
def for_language(self, language_code):
        
        clone = self._clone()
        clone._default_language = language_code
        return clone
12714
public void setNumericCollationDefault() {
        checkNotFrozen();
        CollationSettings defaultSettings = getDefaultSettings();
        if(settings.readOnly() == defaultSettings) { return; }
        CollationSettings ownedSettings = getOwnedSettings();
        ownedSettings.setFlagDefault(CollationSettings.NUMERIC, defaultSettings.options);
        setFastLatinOptions(ownedSettings);
    }
908932
def set_language_from
      session[:lang_from] = params[:lang].to_sym
      I18n.locale = session[:lang_from]
      render nothing: true
    end
550583
public final void setLanguage(Context context, String language) {
        Locale locale = new Locale(language);
        setLanguage(context, locale);
    }
1329738
def init_defaults(self):
        
        super(QueryTable, self).init_defaults()
        self.query = self.table
        self.query.is_inner = True
788053
def set_lang(lang_code=None):
    """"""
    # Check if language is available.
    lang_code = lang_code or request.values.get('lang_code')
    languages = dict(current_app.extensions['invenio-i18n'].get_languages())
    if lang_code is None or lang_code not in languages:
        abort(404 if request.method == 'GET' else 400)

    # Set language in session.
    session[current_app.config['I18N_SESSION_KEY']] = lang_code.lower()

    # Redirect user back.
    target = get_redirect_target()
    if not target:
        endpoint = current_app.config['I18N_DEFAULT_REDIRECT_ENDPOINT']
        target = url_for(endpoint) if endpoint else '/'

    return redirect(target)
1016747
def configure_default(self, **_options):
        '''
        
        '''
        language, voice, voiceinfo, options = self._configure(**_options)
        self.languages_options[language] = (voice, options)
        self.default_language = language
        self.default_options = options
1082106
public void populateLanguages() {
    dataService.add(
        LANGUAGE,
        languageFactory.create(
            LanguageService.DEFAULT_LANGUAGE_CODE, LanguageService.DEFAULT_LANGUAGE_NAME, true));
    dataService.add(
        LANGUAGE,
        languageFactory.create("nl", new Locale("nl").getDisplayName(new Locale("nl")), false));
    dataService.add(
        LANGUAGE,
        languageFactory.create("pt", new Locale("pt").getDisplayName(new Locale("pt")), false));
    dataService.add(
        LANGUAGE,
        languageFactory.create("es", new Locale("es").getDisplayName(new Locale("es")), false));
    dataService.add(
        LANGUAGE,
        languageFactory.create("de", new Locale("de").getDisplayName(new Locale("de")), false));
    dataService.add(
        LANGUAGE,
        languageFactory.create("it", new Locale("it").getDisplayName(new Locale("it")), false));
    dataService.add(
        LANGUAGE,
        languageFactory.create("fr", new Locale("fr").getDisplayName(new Locale("fr")), false));
    dataService.add(LANGUAGE, languageFactory.create("xx", "My language", false));
  }
1286031
def iterator(self):
        
        default_language = getattr(self, '_default_language', None)
        for obj in super(MultilingualModelQuerySet, self).iterator():
            obj._default_language = default_language
            yield obj
1018084
private function setlocale() {
        foreach ($this->codeSets as $code) {
            if (substr($code, 0, strlen($this->loadedLang)) === $this->loadedLang) {
                setlocale(LC_TIME, $code);
                break;
            }
        }
    }
1092073
protected function setLanguageProperties()
    {
        if (!$this->isInternalRoute()) {

            $langcode = $this->route->getLangcode();

            if (!empty($langcode)) {
                $this->langcode = $langcode;
                $this->translation->set($langcode, $this->current_route['simple_pattern']);
                $this->current_language = $this->language->get($this->langcode);
            }
        }
    }
1137525
def set_language(self, lang):
        

        if lang in self.iso_6391:
            self.arguments.update({'lang': '%s' % lang})
        else:
            raise TwitterSearchException(1002)
900221
public static function setDefault()
    {
        if(!self::$default) {
            $languages = Language::all();
            if($languages) {
                $getDefault = $languages->where('isDefault', true);

                if ($getDefault) {
                    self::$default = $getDefault->first();
                    self::$current = self::$default; //current language is the same as default one in this phase

                    App::setLocale(self::$default->slug);
                    Carbon::setLocale(self::$default->slug);
                    return;
                }
            }

            throw new \Exception("Default language could not be found. Please check if a default language is defined in Administration");
        }
        return;
    }
124465
def language(self, language_code=None):
        
        if language_code is None:
            language_code = appsettings.PARLER_LANGUAGES.get_default_language()

        self._language = language_code
        return self
1370872
public function setLanguage($value)
    {
        //$value = strtolower($value);
        if (!isset($this->_models[$value])) {
            $this->_models[$value] = $this->getNewTranslation($value);
        }
        $this->_language = $value;
    }
1343591
def init_language_data(self, lang, lang_data_type):
        
        if lang not in self.loaded_langs:
            self.loaded_langs[lang] = {}

        if lang_data_type not in self.loaded_langs[lang]:
            result = self._query_lang(lang=lang, lang_data_type=lang_data_type)
            data = self._process_lang(result)
            self.loaded_langs[lang].update({lang_data_type: data})
1283423
def set_language(self, language):
        
        self.log([u"Setting language: '%s'", language])
        for fragment in self.fragments:
            fragment.language = language