Set locale menu

@param $locale
@param $menus
185849
public function locale($locale, $menus)
    {
        $this->stack[] = [
            'locale' => $locale,
        ];

        $this->loadMenus($menus);

        $this->menus[] = array_pop($this->stack);
    }
205388
public function setLocale($locale)
    {
        $this->locale = $locale;
        if ($this->coreFormatter instanceof Multilingual) {
            $this->coreFormatter->setLocale($locale);
        }
        if ($this->textProvider instanceof Multilingual) {
            $this->textProvider->setLocale($locale);
        }
        return $this;
    }
463908
public static function setDefaultLocale($locale)
		{

			static::$_defaultLocale = $locale;
			
			// Apply to PHP locale
			if (is_null(static::$_locale)) {
				$sysLocales = \ChickenWire\Application::getConfiguration()->systemLocales;
				if (array_key_exists($locale, $sysLocales)) {
					setlocale(LC_ALL, $sysLocales[$locale]);
				}				
			}
		}
604274
public function setFallbackLocales(array $locales)
    {
        // needed as the fallback locales are linked to the already loaded catalogues
        $this->resetCatalogues();
        foreach ($locales as $locale) {
            LocaleValidator::assertValidLocale($locale);
        }
        $this->fallbackLocales = $locales;
    }
592448
public function setLocale($locale)
    {
        if ($locale && !preg_match('/[a-z]{2,3}/', $locale)) {
            throw new \InvalidArgumentException('Locale must be a valid i18n code');
        }

        $this->i18n = $locale;

        return $this;
    }
1223612
protected void setLocale( Locale locale )
    {
        if ( locale == null ) locale = getDefaultLocale();
        getSession().setAttribute( Globals.LOCALE_KEY, locale );
    }
1013549
public function setContentLocale($locale)
    {
        Session::put('allLocalesInForm', false);
        if ($locale === 'all') {
            Session::put('allLocalesInForm', true);
        } else {
            Session::put('locale', $locale);
        }
    }
1170004
public function setLocale($locale)
    {
        //Check if we have information for this locale
        $file = __DIR__ . '/i18n/' . $locale . '.json';
        if (file_exists($file)) {
            //Read the locale information from the file
            $meta = json_decode(file_get_contents($file), true);
            if (is_array($meta)) {
                $this->locale = $meta;

                return true;
            } else {
                throw new LocaleParseErrorException('Locale "' . $locale . '" could not be parsed correctly');
            }
        } else {
            throw new LocaleNotSupportedException('Locale not supported by this library');
        }
    }
496046
public void setLocale(final Locale LOCALE) {
        if (null == locale) {
            _locale = LOCALE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            locale.set(LOCALE);
        }
    }
979100
public function setTranslations(Locale $locale, Translations $translations)
    {
        $this->translations[$locale->getID()] = [$locale, $translations];
    }
463561
public static function setLocale($locale)
    {
        static::getDefaultLocale();
        Locale::setDefault($locale);
        if (isset(static::$_collection)) {
            static::translators()->setLocale($locale);
        }
    }
568383
public function setDefault($locale)
    {
        // Make sure locale is available (set it on list if not set yet)
        $this->addLocale($locale);

        // Mark as default locale
        $this->default = $this->findByLocale($locale);

        // Mark as current locale (if none set yet)
        if (!$this->getActive()) {
            $this->setActive($this->default);
        }

        return $this;
    }
241283
public function setLocale($locale)
    {
        if (!is_string($locale) || empty($locale)) {
            throw new \InvalidArgumentException('Locale must be an IETF language tag.');
        }

        // Set the Locale on Fixer that needs it
        foreach ($this->_rules as $rule) {
            if ($rule instanceof LocaleAwareFixerInterface) {
                $rule->setLocale($locale);
            }
        }

        $this->locale = $locale;
    }
138023
public function setLocale($locale) {
        $this->locale   = $locale;
        $this->language = substr($locale, 0, (strpos($locale, '-')));
        $this->messages = array();
    }
496217
public function setLocale($locale)
    {
        if ($this->isRoot) {
            $this->translator->setLocale($locale);

            return $this;
        }

        $this->locale = $locale;

        return $this;
    }
1143011
public function setLocale(string $locale): self
    {
        assert(empty($locale) === false && locale_canonicalize($locale) === $locale);

        $this->locale = $locale;

        return $this;
    }
941920
public function setLocale($locale = null, $remember = false)
    {
        $this->_locale->setLocale($locale);
        $t = $this->getTranslator();
        if ($t->isAvailable($this->_locale))
            $t->setLocale($this->_locale);
        if ($remember) $this->_session->locale = $this->_locale->toString();
    }