Get locale this record was originally queried from, or belongs to

@return Locale|null
978051
protected function getRecordLocale()
    {
        $localeCode = $this->owner->getSourceQueryParam('Fluent.Locale');
        if ($localeCode) {
            $locale = Locale::getByLocale($localeCode);
            if ($locale) {
                return $locale;
            }
        }
        return Locale::getCurrentLocale();
    }
451078
public function getLocale()
    {
        if ($this->locale instanceof Locale) {
            return $this->locale;
        }
        if (!isset($this->locales[$this->locale])) {
            $this->locale = 'en';
        }
        // lazy loading
        if (isset(static::$localeInstances[$this->locale])) {
            return static::$localeInstances[$this->locale];
        }
        return static::$localeInstances[$this->locale] = new $this->locales[$this->locale];
    }
684572
public function query()
    {
        $locale = app()->getLocale();
        $query = app($this->model)->query()->orderBy('sort_order', 'ASC')->orderBy("title->\${$locale}", 'ASC');

        return $this->applyScopes($query);
    }
202833
public static function getLocaleBundle()
    {
        @trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Locales::class), E_USER_DEPRECATED);

        if (null === self::$localeBundle) {
            self::$localeBundle = new LocaleBundle(
                self::getDataDirectory().'/'.self::LOCALE_DIR,
                self::getEntryReader()
            );
        }

        return self::$localeBundle;
    }
1308694
protected function getUrlLanguage($locale = null)
    {
        // Check if the functionality is activated
        if (!ConfigQuery::isMultiDomainActivated()) {
            return null;
        }

        // If we don't have a locale value, use the locale value in the session
        if (!$locale) {
            $locale = $this->getCurrentEditionLocale();
        }

        return LangQuery::create()->findOneByLocale($locale)->getUrl();
    }
340494
public function defaultLocale()
    {
        if (($locales = Config::get('decoy.site.locales'))
            && is_array($locales)) {
            reset($locales);

            return key($locales);
        }
    }
453234
public function getLocale()
    {
        // Use the intl extension if present.
        if (class_exists('\Locale')) {
            $locale = \Locale::acceptFromHttp(@$_SERVER['HTTP_ACCEPT_LANGUAGE']);
        }

        // If no locale was obtained, resort to the default one.
        if (empty($locale)) {
            $locale = Application::getSettings()->locale->default;
        }

        return $locale;
    }
534920
public function getLanguage()
    {
        if ($this->sessionManager) {
            $this->sessionManager->start();
        }
        if (!isset($_SESSION['_fine_I18n_language'])){
            return null;
        }
        return $_SESSION['_fine_I18n_language'];
    }
556472
public function DefaultLocale()
    {
        // Return explicit default locale
        if ($this->DefaultLocaleID) {
            $locale = Locale::getCached()->byID($this->DefaultLocaleID);
            if ($locale) {
                return $locale;
            }
        }

        // Use IsGlobalDefault if this is a member of this locale, or the first in the list of children
        $locales = Locale::getCached()->filter('DomainID', $this->ID);
        return $locales->filter('IsGlobalDefault', 1)->first()
            ?: $locales->first();
    }
718615
public Locale getLocale() {
		Locale l = wbRequest.getLocale();
		if (l == null) {
			l = Locale.getAvailableLocales()[0];
		}
		return l;
	}
3262
public function getLocale() {
		if($this->locale === null)
			$this->locale = $this->getDefinition()->getEntityManager()->getDefaultLocale();
		return $this->locale;
	}
1111944
public function getLocale()
    {
      $value = sprintf("%02d-%02d-%04d", $this->day, $this->month, $this->year);
      
      return $value;
    }
533329
public function getTranslationByLocale($locale)
    {
        foreach ($this->getTranslations() as $valueTranslation) {
            if ($valueTranslation->getLocale() === $locale) {
                return $valueTranslation;
            }
        }

        return null;
    }
739913
protected function findLocale()
    {
        $locale = null;

        if (PHP_SAPI == 'cli') {
            $locale = getenv('LANG');
        } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && extension_loaded('intl')) {
            $locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
        }

        return $locale;
    }
546662
@Column(header = Messages.GUI_HISTORY_DIALOG_COL_LOCALE_0, order = 20)
    public String getLocale() {

        return m_elemComp.getLocale().toString();
    }
371035
public function getDefautLocale(): \Nails\Common\Factory\Locale
    {
        return Factory::factory('Locale')
            ->setLanguage(Factory::factory('LocaleLanguage', null, static::DEFAULT_LANGUAGE))
            ->setRegion(Factory::factory('LocaleRegion', null, static::DEFAULT_REGION))
            ->setScript(Factory::factory('LocaleScript', null, static::DEFAULT_SCRIPT));
    }
1165612
public function getCurrentLocale()
    {
        if ( ! is_null($this->currentLocale))
            return $this->currentLocale;

        if ($this->useAcceptLanguageHeader())
            return $this->negotiateLocale();

        // Get application default language
        return $this->getDefaultLocale();
    }