Extend this localization with additional messages from another one.

@param Locale $l
Other localization object.
187522
public function extend(Locale $l)
    {
        $this->messages = array_merge($this->messages, $l->messages);
    }
823002
public function setLang($lang = 'en-us') {
		$this->lang = $lang;

		try {
			$this->messages = parse_ini_file(__DIR__ . '/Lang/' . $this->lang . '.ini');
		} catch (Exception $e) {
			throw $e;
		}
	}
976135
public @Nonnull StaticMessageSource addMessage(@Nonnull Locale locale, @Nonnull String code, @Nonnull String message) {
        ArgumentUtils.requireNonNull("locale", locale);
        if (StringUtils.isNotEmpty(code) && StringUtils.isNotEmpty(message)) {
            messageMap.put(new MessageKey(locale, code), message);
        }
        return this;
    }
1070763
public function setLocale($locale)
    {
        if ( ! in_array($locale, self::$supportedLocales)) {
            throw new LocaleNotSupported(sprintf('Locale "%s" is not supported.', $locale));
        }
        $this->locale = $locale;
    }
950111
public function addLocale(Locale $locale)
    {
        if (isset($this->localeCollection[(string)$locale])) {
            return false;
        }

        // We need to invalidate the parent's array as it could be inaccurate
        $this->localeParentCollection = [];

        $this->localeCollection[(string)$locale] = $locale;
        return true;
    }
226861
public function setLanguage($lang)
    {
        $this->clearCachedValueIf($this->lang != $lang);
        $this->lang = $lang;
    }
197452
public function addTranslation($path, $file) {
        $filename = $path . '/' . $this->locale . '/' . $file . '.php';
        if(!is_readable($filename)) {
            return false;
        } else {
            /** @noinspection PhpIncludeInspection */
            $add_messages = require($filename);
            $this->messages = array_merge($this->messages, $add_messages);
            return true;
        }
    }
457530
public function fillMessage(string $message, string $locale): LocalizedMessage
    {
        foreach ($this->details as $key => $detail) {
            $message = str_replace('{' . $key . '}', $this->flattenDetail($detail), $message);
        }

        return new LocalizedMessage($locale, $message);
    }
254118
public function setDefaultLocale($locale) {

		$this->defaultLocale = $locale;

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

	}
783069
public function setLocale( MShop_Locale_Item_Interface $locale )
	{
		$this->_notifyListeners( 'setLocale.before', $locale );

		$this->_locale = clone $locale;
		$this->_modified = true;

		$this->_notifyListeners( 'setLocale.after', $locale );
	}
1029983
public function setLocale($locale, $ignoreAvailable = false)
    {
        if ($ignoreAvailable || in_array($locale, $this->availableLocales)) {
            $this->currentLocale = $locale;
        } else {
            $this->currentLocale = null;
        }
    }
993847
public static void setLocale(Locale locale) {
        if (RepositoryUtils.locale == null) {
            RepositoryUtils.locale = locale;
        } else {
            if (RepositoryUtils.locale != locale) {
                RepositoryUtils.locale = locale;
                messages = null;
                installMessages = null;
            }
        }
    }
1278168
public function setLocale($locale)
	{
		if(is_string($locale))
			$locale=CLocale::getInstance($locale);
		$this->sizeFormat['decimalSeparator']=$locale->getNumberSymbol('decimal');
		$this->_locale=$locale;
	}
163816
public function addLocalization(Localization $localization)
    {
        $this->localizations[] = $localization;

        if ($localization->isDefault()) {
            $this->setDefaultLocalization($localization);
        }

        if ($localization->isXDefault()) {
            $this->setXDefaultLocalization($localization);
        }
    }
885706
private void addToLocaleList(List localeList, List<Locale> locales) {
        if (locales != null) {
            for (Locale locale : locales) {
                if (locale != null && !localeList.contains(locale)) localeList.add(locale);
            }
        }
    }
714816
public function setLocale($locale)
    {
        $this['config']->set('app.locale', $locale);

        $this['translator']->setLocale($locale);

        $this['events']->dispatch(new Events\LocaleUpdated($locale));
    }
569527
public function setLocale($locale = null)
    {
        $locale = self::_prepareLocale($locale);

        if (isset(self::$_localeData[(string) $locale]) === false) {
            $region = substr((string) $locale, 0, 3);
            if (isset($region[2]) === true) {
                if (($region[2] === '_') or ($region[2] === '-')) {
                    $region = substr($region, 0, 2);
                }
            }

            if (isset(self::$_localeData[(string) $region]) === true) {
                $this->_locale = $region;
            } else {
                $this->_locale = 'root';
            }
        } else {
            $this->_locale = $locale;
        }
    }