Get all locale
@return Renderer
@throws Server500
@throws \Exception
553622
public function getAllActivity():Renderer
    {
        $locales = [];
        $elems = Locale::getAll();
        foreach ($elems as $one => $value) {
            if (null === $value) {
                $locales[] = ["app" => $one, "enabled" => false, "values" => [],
                   "prefered" => null, "transtype" => null,
                   "route_status_change" =>
                       $this->generateRoute(
                           "iumio_manager_locale_manager_framework_change_status_app",
                           ["appname" => $one, "status" => "enabled"]
                       ),
                   "route_get_one_locale_app_save" =>
                       $this->generateRoute(
                           "iumio_manager_locale_manager_edit_one",
                           ["appname" => $one]
                       ),
                       "route_get_one_locale_app" =>
                           $this->generateRoute(
                               "iumio_manager_locale_manager_get_one",
                               ["appname" => $one]
                           )];
            } else {
                $locales[] = ["app" => $one, "enabled" => $value->isEnabled(), "values" => $value->getValues(),
                   "prefered" => $value->getPrefer(), "transtype" => $value->getTranstype(), "route_status_change" =>
                       $this->generateRoute(
                           "iumio_manager_locale_manager_framework_change_status_app",
                           ["appname" => $one, "status" => ((true === $value->isEnabled())? "disabled" : "enabled")]
                       ),
                   "route_get_one_locale_app_save" =>
                       $this->generateRoute(
                           "iumio_manager_locale_manager_edit_one",
                           ["appname" => $one]
                       ),
                   "route_get_one_locale_app" => $this->generateRoute(
                       "iumio_manager_locale_manager_get_one",
                       ["appname" => $one]
                   )];
            }
        }
        return ((new Renderer())->jsonRenderer(array("code" => 200, "results" => $locales)));
    }
262677
private function getBrowserLanguageOrDefault()
    {
        if ($browserLanguage = getenv('HTTP_ACCEPT_LANGUAGE')) {
            $browserLocale = substr($browserLanguage, 0, 2);
            if (in_array($browserLocale, TypiCMS::enabledLocales())) {
                return $browserLocale;
            }
        }

        return config('app.locale');
    }
467897
public function getLocaleMapper()
    {
        if (null === $this->localeMapper) {
            $this->localeMapper = $this->serviceLocator->get('playgroundcore_locale_mapper');
        }

        return $this->localeMapper;
    }
332383
public function getPageLocalization()
	{
		throw new \Exception('Dont use me bro.');

		if (empty($this->pageId)) {
			return;
		}

		if ( ! is_null($this->pageLocalization)) {
			return $this->pageLocalization;
		}

		$em = ObjectRepository::getEntityManager($this);

		$pageData = null;
		$localizationEntity = Localization::CN();
		$localeId = ObjectRepository::getLocaleManager($this)
				->getCurrent()
				->getId();

		$criteria = array(
			'master' => $this->pageId,
			'locale' => $localeId,
		);

		// Now master page ID is stored, still the old implementation is working
		$dql = "SELECT l, m, p FROM $localizationEntity l
				JOIN l.master m
				LEFT JOIN l.path p
				WHERE (l.master = :master AND l.locale= :locale)
				OR l.id = :master";

		try {
			$pageData = $em->createQuery($dql)
					->setParameters($criteria)
					->getSingleResult();
		} catch (NoResultException $noResult) {

			// Special case for group page selection when no localization exists in database
			$master = $em->find(GroupPage::CN(), $this->pageId);

			if ($master instanceof GroupPage) {
				$pageData = $master->getLocalization($localeId);
			}
		}

		// Cache the result
		$this->pageLocalization = $pageData;

		return $pageData;
	}
124360
public static function locale()
    {
        if (!self::isDebug()) {
            return false;
        }

        ob_start();
        @system('locale -a');
        $locale = explode(PHP_EOL, trim(ob_get_contents()));
        ob_end_clean();

        $result = array(
            'list' => $locale,
            'conv' => @localeconv()
        );

        return self::i()->dump($result, '! locale info !');
    }
451717
public function getLocale()
	{
		if (!isset($this->locale))
		{
			$locale = str_replace(' ', '', isset($this->metadata['locale']) ? $this->metadata['locale'] : '');

			if ($locale)
			{
				$this->locale = explode(',', $locale);
			}
			else
			{
				$this->locale = false;
			}
		}

		return $this->locale;
	}
1138969
public function getAllHostsPerConfigActivity():Renderer
    {
        $file = (array) JL::open(FEnv::get("framework.config.hosts.dev.file"));
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.dev.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }
        $alloweddev = count((array)$file['allowed']);
        if (in_array("*", (array)$file['allowed'])) {
            $alloweddev = "ALL";
        }
        $denieddev = count((array)$file['denied']);
        if (in_array("*", (array)$file['denied'])) {
            $denieddev = "ALL";
        }
        $editdev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "dev"),
            null,
            true
        );
        $editsavedev = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "dev"),
            null,
            true
        );

        $file2 = (array) JL::open(FEnv::get("framework.config.hosts.prod.file"));
        if (!(isset($file['allowed'])) || !(isset($file['denied']))) {
            throw new Server500(new \ArrayObject(array("explain" => "Undefined key allowed or denied in host.prod.json",
                "solution" => "Add the correct tags [allowed, denied]")));
        }
        $allowedprod= count((array)$file2['allowed']);
        if (in_array("*", (array)$file2['allowed'])) {
            $allowedprod = "ALL";
        }
        $deniedprod = count((array)$file2['denied']);
        if (in_array("*", (array)$file2['denied'])) {
            $deniedprod = "ALL";
        }
        if (in_array("", (array)$file2['denied'])) {
            $deniedprod = "None";
        }
        $editprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit",
            array("env" => "prod"),
            null,
            true
        );
        $editsaveprod = $this->generateRoute(
            "iumio_manager_hosts_manager_edit_save",
            array("env" => "prod"),
            null,
            true
        );
        
        $rs = array(
            "dev" => array(
                "allowed" => $alloweddev, "denied" => $denieddev, "edit" => $editdev, "save" => $editsavedev
            ),
            "prod" => array(
                "allowed" => $allowedprod, "denied" => $deniedprod, "edit" => $editprod, "save" => $editsaveprod
            ),
        );
        
        return ((new Renderer())->jsonRenderer(array("code" => 200,
            "results" => $rs)));
    }
765895
protected function getCurrentLanguage()
    {
        $request = $this->requestStack->getCurrentRequest();

        return $this->localeConverter->convertToEz($request->get('_locale'));
    }
181906
private function getClientBrowserAccepted()
    {
        $this->autoPopulateSuperGlobals();
        $sReturn = [
            'accept'          => $this->brServerGlobals->server->get('HTTP_ACCEPT'),
            'accept_encoding' => $this->brServerGlobals->server->get('HTTP_ACCEPT_ENCODING'),
        ];
        if (!is_null($this->brServerGlobals->server->get('HTTP_ACCEPT_LANGUAGE'))) {
            $sReturn['accept_language']     = $this->brServerGlobals->server->get('HTTP_ACCEPT_LANGUAGE');
            $prfd                           = null;
            preg_match_all('/([a-z]{2})(?:-[a-zA-Z]{2})?/', $sReturn['accept_language'], $prfd);
            $sReturn['preferred locale']    = $prfd[0];
            $sReturn['preferred languages'] = array_values(array_unique(array_values($prfd[1])));
        }
        return $sReturn;
    }
640019
public static function getLocale()
    {
        if (empty(self::$locale)) {
            self::$locale = new StringType(\locale_get_default());
        }

        return self::$locale;
    }
321584
protected function formatter()
    {
        $key = $this->getLocalesKey(
            $locale = $this->getLocale(),
            $fallbackLocale = $this->getFallbackLocale()
        );

        if (! isset($this->formatters[$key])) {
            $this->formatters[$key] = new CurrencyFormatter(
                new NumberFormatRepository($fallbackLocale),
                $this->data(),
                ['locale' => $locale]
            );
        }

        return $this->formatters[$key];
    }
290169
public function getAvailableLocales() {

		foreach($this->locales as $id => $l) {
			if(!$l) {
				$this->locales[$id] = new Locale($id);
			}
		}

		return $this->locales;
	}
1347630
protected function getRenderer()
    {
        if ($this->renderer === null) {
            $this->renderer = $this->serviceLocator->get('ViewRenderer');
        }

        return $this->renderer;
    }
735955
private function getAvailableLocales()
    {
        if (empty($this->availableLocales)) {
            // Open the pages directory.
            $pagesDirectory = opendir('../data/pages/');
            while ($directory = readdir($pagesDirectory)) {
                if (($directory != '.') && ($directory != '..')) {
                    $this->availableLocales[] = $directory;
                }
            }
            closedir($pagesDirectory);
        }

        return $this->availableLocales;
    }
63446
public function render()
    {
        return $this->withLocale($this->locale, function () {
            Container::getInstance()->call([$this, 'build']);

            return Container::getInstance()->make('mailer')->render(
                $this->buildView(), $this->buildViewData()
            );
        });
    }
465719
public function getAllDomainsByLocale()
    {
        return TransUnitQuery::create()
            ->joinWith('Translation')
            ->withColumn('Translation.Locale', 'locale')
            ->withColumn('Domain', 'domain')
            ->select(array('locale', 'domain'))
            ->groupBy('locale')
            ->groupBy('domain')
            ->find($this->getConnection())
            ->getArrayCopy()
        ;
    }
402712
@Override
    public Locale getLocale() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getLocale();
        } finally {
            collaborator.postInvoke();
        }
    }