Active
Project:
Content Management Filter
Version:
6.x-2.0
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2011 at 14:19 UTC
Updated:
24 Jan 2011 at 14:19 UTC
When I translate CMF filter page, I found the thing I can not translate which are roles directly from roles table.
Should the t function be deployed in cmf_get_roles function? See the code below.
Thanks much for such a great module in advance.
/**
* Builds a list of available roles
*
* @param the format in which to return the list
* @return array of all available roles
*/
function cmf_get_roles($op) {
switch ($op) {
case 'names':
$result = db_query('SELECT rid, name FROM {role} ORDER BY name');
break;
}
$roles = array();
while ($role = db_fetch_object($result)) {
//$roles[$role->rid] = $role->name; // It should consider multi-lingual by using t function.
$roles[$role->rid] = t($role->name);
}
return $roles;
}