作者 耿培杰

修改中英文切换问题

... ... @@ -34,7 +34,7 @@
<div class="form-group">
<label for="c-gender" class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], $row['gender'])}
{:build_radios('row[gender]', ['1'=>__('Male'), '2'=>__('Female')], $row['gender'])}
</div>
</div>
<div class="form-group">
... ...
... ... @@ -83,7 +83,9 @@ class Api
public function __construct(Request $request = null)
{
$this->request = is_null($request) ? Request::instance() : $request;
$lang = $this->request->header('lang');
if (empty($lang)) $this->lang = 'ch'; //$this->error('缺少lang!');
else $this->lang = $lang;
// 控制器初始化
$this->_initialize();
... ... @@ -120,9 +122,7 @@ class Api
$this->user = $user;
$this->userId = $user['id'];
}
$lang = $this->request->header('lang');
if (empty($lang)) $this->lang = 'ch'; //$this->error('缺少lang!');
else $this->lang = $lang;
/*if (Config::get('url_domain_deploy')) {
$domain = Route::rules('domain');
if (isset($domain['api'])) {
... ...