0

当我在管理菜单中查看用户类型时,它们都是俄语,但是当我从 DB 中获取它时,它的语言似乎是英语,无法弄清楚。Sql 看起来像这样:

$query = "SELECT cc.title AS category, a.title,
u.username,u.usertype as usertype, a.hits ,ua.avatar as avatar, ar.intotext as introtext,
u.lastvisitDate as lastvisit, s.userid as onlineid
FROM #__content AS a
LEFT JOIN #__categories AS cc ON a.catid = cc.id
LEFT JOIN #__users AS u ON u.id = a.created_by
LEFT JOIN #__comprofiler AS ua ON user_id = a.created_by
LEFT JOIN #__session s ON s.userid = a.created_by AND s.guest = 0
LEFT JOIN #__cck_store_item_cck_store_item_content AS ar ON ar.id = ".(int)$itemid."
WHERE a.id =  ".(int)$itemid."
and a.access = 1";
4

1 回答 1

0

您不会获得某种语言的内容,而是在准备页面时使用 JText 将数据库中的密钥翻译成用户的适当语言。

如果您要做的是用俄语呈现用户组名称,则需要使用 JText()。

于 2013-03-09T14:11:30.543 回答