Sets the fallback locales.

        @type locales: list[str]
        @param locales: The falback locales

        @raises: ValueError: If a locale contains invalid characters
490025
def set_fallback_locales(self, locales):
        
        # needed as the fallback locales are linked to the already loaded
        # catalogues
        self.catalogues = {}

        for locale in locales:
            self._assert_valid_locale(locale)

        self.fallback_locales = locales
908615
public void addLocale(final LocaleId locale) {
        synchronized (this.locales) {
            if (this.locales == null) {
                this.locales = new ArrayList<LocaleId>();
            }
            this.locales.add(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
437586
public void setLocale(Locale locale) {

        getStateHelper().put(PropertyKeys.locale, locale);
        // Make sure to appraise the EL of this switch in Locale.
        FacesContext.getCurrentInstance().getELContext().setLocale(locale);

    }
75131
def available_locales
      cached_locales = cache.keys.map { |key| key.split('.').first }
      (cached_locales + super).uniq.map { |locale| locale.to_sym }
    end
540316
public void setLocale(Locale l) {
		if (!initialized) {
			super.setLocale(l);
		} else {
			Locale oldLocale = locale;
			locale = l;
			dayChooser.setLocale(locale);
			monthChooser.setLocale(locale);
			firePropertyChange("locale", oldLocale, locale);
		}
	}
1367371
public function forLocale($locale, $fallbacks = null)
    {
        $fork = new static(
            $this->coreFormatter,
            $this->extractor,
            $this->typeProvider,
            $this->textProvider,
            $this->_extensions
        );

        if ($fallbacks) {
            $fork->setFallbacks((array)$fallbacks);
        }

        return $fork->setLocale($locale);
    }
680605
private void initLocalizations(String[][] localizations) {
        if (localizations != null) {
            publicRuleSetNames = localizations[0].clone();

            Map<String, String[]> m = new HashMap<String, String[]>();
            for (int i = 1; i < localizations.length; ++i) {
                String[] data = localizations[i];
                String loc = data[0];
                String[] names = new String[data.length-1];
                if (names.length != publicRuleSetNames.length) {
                    throw new IllegalArgumentException("public name length: " + publicRuleSetNames.length +
                                                       " != localized names[" + i + "] length: " + names.length);
                }
                System.arraycopy(data, 1, names, 0, names.length);
                m.put(loc, names);
            }

            if (!m.isEmpty()) {
                ruleSetDisplayNames = m;
            }
        }
    }
157475
public BuiltinSlotTypeMetadata withSupportedLocales(Locale... supportedLocales) {
        java.util.ArrayList<String> supportedLocalesCopy = new java.util.ArrayList<String>(supportedLocales.length);
        for (Locale value : supportedLocales) {
            supportedLocalesCopy.add(value.toString());
        }
        if (getSupportedLocales() == null) {
            setSupportedLocales(supportedLocalesCopy);
        } else {
            getSupportedLocales().addAll(supportedLocalesCopy);
        }
        return this;
    }
944485
function () {
			var i18n = this;

			// Set locale of String environment
			String.locale = i18n.locale;

			// Override String.localeString method
			String.prototype.toLocaleString = function () {
				var localeParts, localePartIndex, value, locale, fallbackIndex,
					tryingLocale, message;

				value = this.valueOf();
				locale = i18n.locale;
				fallbackIndex = 0;

				while ( locale ) {
					// Iterate through locales starting at most-specific until
					// localization is found. As in fi-Latn-FI, fi-Latn and fi.
					localeParts = locale.split( '-' );
					localePartIndex = localeParts.length;

					do {
						tryingLocale = localeParts.slice( 0, localePartIndex ).join( '-' );
						message = i18n.messageStore.get( tryingLocale, value );

						if ( message ) {
							return message;
						}

						localePartIndex--;
					} while ( localePartIndex );

					if ( locale === 'en' ) {
						break;
					}

					locale = ( $.i18n.fallbacks[i18n.locale] && $.i18n.fallbacks[i18n.locale][fallbackIndex] ) ||
						i18n.options.fallbackLocale;
					$.i18n.log( 'Trying fallback locale for ' + i18n.locale + ': ' + locale );

					fallbackIndex++;
				}

				// key not found
				return '';
			};
		}
512432
static GJLocaleSymbols forLocale(Locale locale) {
        if (locale == null) {
            locale = Locale.getDefault();
        }
        GJLocaleSymbols symbols = cCache.get(locale);
        if (symbols == null) {
            symbols = new GJLocaleSymbols(locale);
            GJLocaleSymbols oldSymbols = cCache.putIfAbsent(locale, symbols);
            if (oldSymbols != null) {
                symbols = oldSymbols;
            }
        }
        return symbols;
    }
82000
public static function setFallbackLocale($locale)
    {
        $translator = static::getTranslator();

        if (method_exists($translator, 'setFallbackLocales')) {
            $translator->setFallbackLocales([$locale]);

            if ($translator instanceof Translator) {
                $preferredLocale = $translator->getLocale();
                $translator->setMessages($preferredLocale, array_replace_recursive(
                    $translator->getMessages()[$locale] ?? [],
                    Translator::get($locale)->getMessages()[$locale] ?? [],
                    $translator->getMessages($preferredLocale)
                ));
            }
        }
    }
1018084
private function setlocale() {
        foreach ($this->codeSets as $code) {
            if (substr($code, 0, strlen($this->loadedLang)) === $this->loadedLang) {
                setlocale(LC_TIME, $code);
                break;
            }
        }
    }
254118
public function setDefaultLocale($locale) {

		$this->defaultLocale = $locale;

		if (NULL === $this->locale) {
			$this->setPhpDefaultLocale($locale);
		}

	}
411615
def _localectl_set(locale=''):
    '''
    
    '''
    locale_params = _parse_dbus_locale() if dbus is not None else _localectl_status().get('system_locale', {})
    locale_params['LANG'] = six.text_type(locale)
    args = ' '.join(['{0}="{1}"'.format(k, v) for k, v in six.iteritems(locale_params) if v is not None])
    return not __salt__['cmd.retcode']('localectl set-locale {0}'.format(args), python_shell=False)
616667
function defaultLocale() {
		var sLocale;
		// use the current session locale, if available
		if (window.sap && window.sap.ui && sap.ui.getCore) {
			sLocale = sap.ui.getCore().getConfiguration().getLanguage();
			sLocale = normalize(sLocale);
		}
		// last fallback is english if no or no valid locale is given
		return sLocale || "en";
	}
333460
private void setCalcTypeForLocale(ULocale locale) {
        String localeCalType = CalendarUtil.getCalendarType(locale);
        if("ethiopic-amete-alem".equals(localeCalType)) { 
            setAmeteAlemEra(true);
        } else {
            setAmeteAlemEra(false); // default - Amete Mihret
        }
    }