Add map for a virtual locale.

@param string $locale
@param array  $map

@return $this
518187
public function addMap($locale, $map)
    {
        // Get sanitized locale
        $locale = Locale::sanitizeLocale($locale);

        $this->maps[$locale] = $map;

        return $this;
    }
230089
public function setLocale($locale)
    {
        $this->locale = $locale;

        $this->getContentRoute()->setLocale($locale);

        return $this;
    }
866181
public function setTranslation(string $key, string $locale, $value)
    {
        $this->guardAgainstUntranslatableAttribute($key);

        $translations = $this->getTranslations($key);

        $oldValue = $translations[ $locale ] ?? '';

        if ($this->hasSetMutator($key)) {
            $method = 'set' . Str::studly($key) . 'Attribute';
            $this->{$method}($value, $locale);
            $value = $this->attributes[ $key ];
        }

        $translations[ $locale ] = $value;

        $this->attributes[ $key ] = $this->asJson($translations);

        if (!$this->id) {
            $this->save();
        }

        $this->translations()->updateOrCreate(
            [
                'key'    => $key,
                'locate' => $locale,
            ],
            [
                'key'    => $key,
                'locate' => $locale,
                'value'  => $value,
            ]);

        return $this;
    }
596801
public function extend_fieldmap($map)
    {
        if (is_array($map)) {
            self::$fieldmap = array_merge($map, self::$fieldmap);
        }
    }
969355
public function locale(string $locale): SectionTwigExtension
    {
        $this->options[ReadOptions::LOCALE] = $locale;

        return $this;
    }
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;
    }
230024
private function add(JukeboxMap $map, $addFirst = false)
    {
        if ($addFirst) {
            array_unshift($this->mapQueue, $map);
        } else {
            array_push($this->mapQueue, $map);
        }

    }
1098650
public function setLocale($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->locale !== $v) {
            $this->locale = $v;
            $this->modifiedColumns[PersonImageI18nTableMap::LOCALE] = true;
        }


        return $this;
    }
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;
    }
1213051
public function addPreinitLocale($locale) {
		$locale = (string) $locale;
		
		if (in_array($locale, $this->preinitLocales, true)) {
			return $this;
		}
		
		$this->preinitLocales[] = $locale;
		$this->preinitNeed      = true;
		
		return $this;
	}
496217
public function setLocale($locale)
    {
        if ($this->isRoot) {
            $this->translator->setLocale($locale);

            return $this;
        }

        $this->locale = $locale;

        return $this;
    }
483229
public function addFallbackLocale($locale, $preinit = false) {
		$locale = (string) $locale;
		$locale = $this->normalizeLocale($locale);
		
		if (in_array($locale, $this->fallbackLocales, true)) {
			return $this;
		}
		
		$this->fallbackLocales[] = $locale;
		
		if ($preinit) {
			$this->addPreinitLocale($locale);
		}
		
		return $this;
	}
1222890
public function setLocalizations(array $localizations)
    {
        $this->localizations = new ArrayIterator();

        foreach ($localizations as $ident => $translations) {
            $this->addLocalization($ident, $translations);
        }

        return $this;
    }
791842
public function setLocale($locale = null)
    {
        if (is_null($locale)) {
            $locale = $this->getParent()->getLocale();
        }
        $this->locale = $locale;

        return $this;
    }
591944
public function setLocale($locale)
    {
        if ($locale instanceof Locale) {
            $this->locale = $locale;
            return $this;
        }
        $this->locale = strtolower($locale);
        return $this;
    }
667454
public function addClassMap(array $map)
    {
        if (empty($this->classMap)) {
            $this->classMap = $map;

            return $this;
        }
        $this->classMap = array_merge($this->classMap, $map);

        return $this;
    }
163816
public function addLocalization(Localization $localization)
    {
        $this->localizations[] = $localization;

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

        if ($localization->isXDefault()) {
            $this->setXDefaultLocalization($localization);
        }
    }