public function get(): Locale
    {
        $locale = $this->originalLocale;

        $convert_locales = $this->config->get('convert_locales');
        $conversions = $this->config->get('convert_locales_to', []);

        if ('auto' === $convert_locales) {
            $locale = isset($conversions[$locale->get()])
                ? Locale::from($conversions[$locale->get()])
                : $locale->withoutRegion();
        } elseif (true === $convert_locales && isset($conversions[$locale->get()])) {
            $locale = Locale::from($conversions[$locale->get()]);
        }

        return $locale;
    }
public function get(): Locale
    {
        $locale = $this->originalLocale;

        $convert_locales = $this->config->get('convert_locales');
        $conversions = $this->config->get('convert_locales_to', []);

        if ('auto' === $convert_locales) {
            $locale = isset($conversions[$locale->get()])
                ? Locale::from($conversions[$locale->get()])
                : $locale->withoutRegion();
        } elseif (true === $convert_locales && isset($conversions[$locale->get()])) {
            $locale = Locale::from($conversions[$locale->get()]);
        }

        return $locale;
    }
public function get ( ) : Locale { $ locale = $ this -> originalLocale ; $ convert_locales = $ this -> config -> get ( 'convert_locales' ) ; $ conversions = $ this -> config -> get ( 'convert_locales_to' , [ ] ) ; if ( 'auto' === $ convert_locales ) { $ locale = isset ( $ conversions [ $ locale -> get ( ) ] ) ? Locale :: from ( $ conversions [ $ locale -> get ( ) ] ) : $ locale -> withoutRegion ( ) ; } elseif ( true === $ convert_locales && isset ( $ conversions [ $ locale -> get ( ) ] ) ) { $ locale = Locale :: from ( $ conversions [ $ locale -> get ( ) ] ) ; } return $ locale ; }
Convert locale to application locale.

@return Locale
Convert locale to application locale .