|
...
|
...
|
@@ -138,6 +138,11 @@ class LoginController extends BaseController |
|
|
|
* @time :2023/6/28 16:13
|
|
|
|
*/
|
|
|
|
public function stringTranslation(){
|
|
|
|
$this->request->validate([
|
|
|
|
'str'=>'required',
|
|
|
|
],[
|
|
|
|
'str.required' => '翻译字符串不能为空',
|
|
|
|
]);
|
|
|
|
$str = Translate::tran($this->param['str'], 'en');
|
|
|
|
$this->response('success',Code::SUCCESS,strtolower($str));
|
|
|
|
}
|
...
|
...
|
|