App\Services\Locale\CurrentLocale::getContentLocale PHP 메소드

getContentLocale() 공개 정적인 메소드

public static getContentLocale ( ) : string
리턴 string
    public static function getContentLocale() : string
    {
        if (!static::isValidLocale(locale())) {
            return config('app.locales')[0];
        }
        return locale();
    }

Usage Example

예제 #1
0
function content_locale() : string
{
    return \App\Services\Locale\CurrentLocale::getContentLocale();
}