Configure the source locale.
183439
private function configureSourceLocale()
    {
        $em = $this->app->make(EntityManager::class);
        /* @var EntityManager $em */
        $repo = $this->app->make(LocaleRepository::class);
        if ($repo->findOneBy(['isSource' => true]) === null) {
            $locale = LocaleEntity::create('en_US');
            $locale
                ->setIsApproved(true)
                ->setIsSource(true)
            ;
            $em->persist($locale);
            $em->flush($locale);
        }
    }
1326836
protected function fixateLocale() {
		$this->locale = I18n::getLocale();

		$primaryLocale = $this->getPrimaryLocale();
		if ($primaryLocale && $primaryLocale !== $this->locale) {
			I18n::setLocale($primaryLocale);
		}
	}
363755
public void setContentLocale(Locale locale) {

        m_contentLocale = locale;
        m_dateFieldKey = CmsSearchField.FIELD_INSTANCEDATE + "_" + m_contentLocale.toString() + "_dt";
    }
863167
void setLocale(Locale locale)
   {
      m_resourceNames = LocaleData.getStringArray(locale, LocaleData.RESOURCE_NAMES);

      String name;
      m_resourceNumbers.clear();

      for (int loop = 0; loop < m_resourceNames.length; loop++)
      {
         name = m_resourceNames[loop];
         if (name != null)
         {
            m_resourceNumbers.put(name, Integer.valueOf(loop));
         }
      }
   }
525496
public function setLocale($locale)
	{
		$this['config']->set('app.locale', $locale);

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

		$this['events']->fire('locale.changed', array($locale));
	}
189687
private void initLocales() {

        if (!m_localeCache.isEmpty()) {
            return;
        }
        readLocale(m_primaryResource);
        for (CmsResource resource : m_secondaryResources) {
            readLocale(resource);
        }
        for (Map.Entry<CmsResource, Locale> entry : m_localeCache.entrySet()) {
            CmsResource key = entry.getKey();
            Locale value = entry.getValue();
            m_resourcesByLocale.put(value, key);
        }
        try {
            CmsProperty noTranslationProp = m_cms.readPropertyObject(
                m_primaryResource,
                CmsPropertyDefinition.PROPERTY_LOCALE_NOTRANSLATION,
                false);
            m_noTranslation = noTranslationProp.getValue();
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);

        }
    }
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);

    }
1068805
protected function setSystemLocale()
    {
        $u = new User();
        $lan = $u->getUserLanguageToDisplay();
        $loc = Localization::getInstance();
        $loc->setContextLocale(Localization::CONTEXT_UI, $lan);
    }
1190913
public function setLocale($locale)
    {
        /** @var Config $config */
        $config = $this->get('config');
        $config->set('app.locale.selected', $locale);

        /** @noinspection PhpUndefinedMethodInspection */
        $this->get('translator')->setLocale($locale);
    }
1103666
protected function restoreLocale() {
		$primaryLocale = $this->getPrimaryLocale();
		if ($primaryLocale && $primaryLocale !== $this->locale) {
			I18n::setLocale($this->locale);
		}
	}
1223612
protected void setLocale( Locale locale )
    {
        if ( locale == null ) locale = getDefaultLocale();
        getSession().setAttribute( Globals.LOCALE_KEY, locale );
    }
1309291
public void setLocaleManager(CmsLocaleManager localeManager) {

        m_localeManager = localeManager;
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_CONFIG_I18N_FINISHED_0));
        }
    }
234473
function addLocale(context, payload) {
      context.commit({
        type: 'ADD_LOCALE',
        locale: payload.locale,
        translations: payload.translations
      });
    }
750394
def _process_locale(self, locale):
        """"""

        if locale.lower().startswith('en'):
            return False

        return (locale in self.enabled_locales or

                self.reverse_locale_map.get(locale.lower(), None)
                in self.enabled_locales or

                locale in self.lower_locales or

                self.reverse_locale_map.get(locale.lower(), None)
                in self.lower_locales
        )
695343
@Override
  public void localizeConfiguration(JobConf conf) throws IOException {
    super.localizeConfiguration(conf);
    conf.setNumMapTasks(numMaps);
  }
781840
public static void setLocale(Locale l) throws IllegalArgumentException {

        synchronized (mutex) {
            if (l == null) {
                throw new IllegalArgumentException("null locale");
            }

            locale = l;
        }
    }
53193
def initialize_i18n
      radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
      configuration.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
      super
    end