think\Lang::range PHP Method

range() public static method

设定当前的语言
public static range ( $range = '' )
    public static function range($range = '')
    {
        if ('' == $range) {
            return self::$range;
        } else {
            self::$range = $range;
        }
    }

Usage Example

Example #1
0
 public function testRange()
 {
     $this->assertEquals('zh-cn', Lang::range());
     Lang::set('hello', '欢迎', 'test');
     Lang::range('test');
     $this->assertEquals('test', Lang::range());
     $this->assertEquals('欢迎', Lang::get('hello'));
 }
All Usage Examples Of think\Lang::range