我想知道是否有一种方法可以在运行时访问翻译(i18n)数组。我需要访问它,以便翻转数组,并将一些东西翻译回源语言。(需要在DB上执行基于外语用户输入的SQL查询)。
非常感谢,Andras
这是我的最终解决方案,虽然看起来并不漂亮。
$arr = include(Yii::getalias(Yii::$app->i18n->translations['app']['basePath'] . "/" . Yii::$app->language . "/app.php"));