Lang::locale PHP Method

locale() public static method

Get the default locale being used.
public static locale ( ) : string
return string
        public static function locale()
        {
            return \Illuminate\Translation\Translator::locale();
        }

Usage Example

 protected function ensureBackwardsCompatibility($messages)
 {
     if (preg_match('/^\\{"[a-z]{2}":/', $messages)) {
         return $messages;
     } else {
         return '{"' . Lang::locale() . '":' . $messages . '}';
     }
 }
All Usage Examples Of Lang::locale