TaoLer/app/common/controller/Language.php

29 lines
380 B
PHP
Raw Normal View History

2020-11-02 21:54:26 +08:00
<?php
2020-11-23 17:03:25 +08:00
2020-11-02 21:54:26 +08:00
namespace app\common\controller;
use think\facade\Cookie;
class Language
{
public function select($lang)
{
switch ($lang) {
case 'cn':
Cookie::set('think_lang','zh-cn');
break;
case 'en':
Cookie::set('think_lang','en-us');
break;
case 'tw':
Cookie::set('think_lang','zh-tw');
break;
default:
break;
}
return true;
}
}