Sets default locale and locale for conext wrapping, see {@link #wrap(Context)}.
514247
public static void setLocale(@NonNull Locale locale) {
        if (!locale.equals(Locale.getDefault())) {
            LocalizationHelper.locale = locale;
            Locale.setDefault(locale);
        }
    }
598762
def setBaseLocale(self, locale):
        
        locale = str(locale)
        if self._baseLocale == locale:
            return
        
        try:
            babel.Locale.parse(locale)
        except (babel.UnknownLocaleError, StandardError):
            return False
        
        self._baseLocale = locale
        self.setCurrentLocale(locale)
        self.setDirty()
        return True
983202
protected void setLocale(String strLocale) {
	if (strLocale == null) {
	    this.locale = Locale.US;
	}
	else {
	    try {
		this.locale = Caster.toLocale(strLocale);
		if (this.locale == null) this.locale = Locale.US;
	    }
	    catch (ExpressionException e) {
		this.locale = Locale.US;
	    }
	}
    }
643408
public static void setFallbackLocale (@Nonnull final Locale aFallbackLocale)
  {
    ValueEnforcer.notNull (aFallbackLocale, "FallbackLocale");
    s_aRWLock.writeLocked ( () -> s_aFallbackLocale = aFallbackLocale);
  }
960321
private void init() {

        mTextToSpeech = new TextToSpeech(mContext, new OnInitListener() {

            @Override
            public void onInit(int status) {

                if (status == TextToSpeech.SUCCESS) {
                    checkCurrentLocale();
                    int result = mTextToSpeech.setLanguage(mLocale);

                    if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {
                        mLocale = getDefaultLocale();
                        init();
                        Log.i(TAG, "set default locale (English US) for gvrAccessibility");
                    }
                }
            }
        });

    }
595302
public void setMixDefaultAndLocalPrefixSettings(final boolean value) {
		this.mixDefaultAndLocalPrefixes = value;
		if (properties instanceof PrefixedProperties) {
			((PrefixedProperties) properties).setMixDefaultAndLocalPrefixSettings(value);
		}
	}
387326
public void setLocale(Locale newLocale) throws PropertyVetoException
	{
		if (newLocale == null || newLocale == locale)
		{
			return; // ignore null locale
		}

		PropertyChangeEvent event = new PropertyChangeEvent(beanContextChildPeer, "locale", locale, newLocale);

		// apply change
		Locale oldLocale = locale;
		locale = newLocale;

		try
		{
			// notify vetoable listeners
			vcSupport.fireVetoableChange(event);
		}
		catch (PropertyVetoException e)
		{
			// rollback change
			locale = oldLocale;
			throw e;
		}
		// Notify BeanContext about this change
		this.pcSupport.firePropertyChange(event);
	}
496046
public void setLocale(final Locale LOCALE) {
        if (null == locale) {
            _locale = LOCALE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            locale.set(LOCALE);
        }
    }
775435
public static synchronized void setLocale(String newLocale) throws UnsupportedLocaleException {
        Preconditions.checkArgument(newLocale == null, "newLocale == null");
        if (!newLocale.equals(CURRENT_LOCALE)) {
            LogCentral.setLocale(newLocale);
            CURRENT_LOCALE = newLocale;
        }
    }
1162212
private String localize(String key, String defaultValue) {
    String result = defaultValue;
    if (bundle != null) {
      try {
        result = bundle.getString(key);
      }
      catch (MissingResourceException mre) {
      }
    }
    return result;
  }
307436
def localization_feature(app):
    

    # apply app default to babel
    app.config['BABEL_DEFAULT_LOCALE'] = app.config['DEFAULT_LOCALE']
    app.config['BABEL_DEFAULT_TIMEZONE'] = app.config['DEFAULT_TIMEZONE']

    # init babel
    babel = Babel()
    babel.init_app(app)
916762
public void setLocal()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setLocal");

        getLocalisationManager().setLocal();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setLocal");
    }
1068805
protected function setSystemLocale()
    {
        $u = new User();
        $lan = $u->getUserLanguageToDisplay();
        $loc = Localization::getInstance();
        $loc->setContextLocale(Localization::CONTEXT_UI, $lan);
    }
550583
public final void setLanguage(Context context, String language) {
        Locale locale = new Locale(language);
        setLanguage(context, locale);
    }
116786
public static void setLocale(ProjectProperties properties, Locale locale)
   {
      properties.setMpxDelimiter(LocaleData.getChar(locale, LocaleData.FILE_DELIMITER));
      properties.setMpxProgramName(LocaleData.getString(locale, LocaleData.PROGRAM_NAME));
      properties.setMpxCodePage((CodePage) LocaleData.getObject(locale, LocaleData.CODE_PAGE));

      properties.setCurrencySymbol(LocaleData.getString(locale, LocaleData.CURRENCY_SYMBOL));
      properties.setSymbolPosition((CurrencySymbolPosition) LocaleData.getObject(locale, LocaleData.CURRENCY_SYMBOL_POSITION));
      properties.setCurrencyDigits(LocaleData.getInteger(locale, LocaleData.CURRENCY_DIGITS));
      properties.setThousandsSeparator(LocaleData.getChar(locale, LocaleData.CURRENCY_THOUSANDS_SEPARATOR));
      properties.setDecimalSeparator(LocaleData.getChar(locale, LocaleData.CURRENCY_DECIMAL_SEPARATOR));

      properties.setDateOrder((DateOrder) LocaleData.getObject(locale, LocaleData.DATE_ORDER));
      properties.setTimeFormat((ProjectTimeFormat) LocaleData.getObject(locale, LocaleData.TIME_FORMAT));
      properties.setDefaultStartTime(DateHelper.getTimeFromMinutesPastMidnight(LocaleData.getInteger(locale, LocaleData.DEFAULT_START_TIME)));
      properties.setDateSeparator(LocaleData.getChar(locale, LocaleData.DATE_SEPARATOR));
      properties.setTimeSeparator(LocaleData.getChar(locale, LocaleData.TIME_SEPARATOR));
      properties.setAMText(LocaleData.getString(locale, LocaleData.AM_TEXT));
      properties.setPMText(LocaleData.getString(locale, LocaleData.PM_TEXT));
      properties.setDateFormat((ProjectDateFormat) LocaleData.getObject(locale, LocaleData.DATE_FORMAT));
      properties.setBarTextDateFormat((ProjectDateFormat) LocaleData.getObject(locale, LocaleData.DATE_FORMAT));
   }
1219026
protected function setLocale()
    {
        $locale = $this->app['config']['app.locale'];
        $fallbackLocale = $this->app['config']['app.fallback_locale'];

        Punic::setDefaultLocale($locale);
        Punic::setFallbackLocale($fallbackLocale);
    }
929534
public void setLocale(Locale locale) {
        mLocale = locale;
        mWeekStart = Calendar.getInstance(mTimezone, mLocale).getFirstDayOfWeek();
        YEAR_FORMAT = new SimpleDateFormat("yyyy", locale);
        MONTH_FORMAT = new SimpleDateFormat("MMM", locale);
        DAY_FORMAT = new SimpleDateFormat("dd", locale);
    }