以正确的语言获取Joomla usertype值

时间:2013-03-09 12:02:49

标签: sql joomla usertype

当我在管理菜单中查看usertypes时,它们都是俄语,但是当我从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";

1 个答案:

答案 0 :(得分:0)

您没有使用某种语言的东西,在准备页面时,您使用JText将数据库中的键转换为适当的用户语言。

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