i18nprofile_categories($getraw = FALSE)
contributions/i18n/i18nprofile/i18nprofile.module, line 230
Returns translated categories
@ TODO Drupal 6
Note: weight must be minor than profile module's for them to be added first
$getraw Return the raw array of translations
<?php
function i18nprofile_categories($getraw = FALSE) {
$language = i18n_get_lang();
if ($translation = variable_get('i18nprofile_'.$language, 0)) {
if($getraw) {
return $translation;
}
foreach($translation as $name => $value) {
$categories[] = array('name' => $name, 'title' => $value, 'weight' => 2);
}
return $categories;
} else {
return array();
}
}
?>