You are here

function i18nprofile_translation in Internationalization 5

Same name and namespace in other branches
  1. 5.3 i18nprofile/i18nprofile.module \i18nprofile_translation()
  2. 5.2 i18nprofile/i18nprofile.module \i18nprofile_translation()

Menu callback: profile translations

1 string reference to 'i18nprofile_translation'
i18nprofile_menu in i18nprofile/i18nprofile.module
Implementation of hook_menu().

File

i18nprofile/i18nprofile.module, line 183

Code

function i18nprofile_translation($type = NULL, $id = NULL, $language = NULL) {
  if ($type == 'field' && $id && $language && ($field = db_fetch_object(db_query("SELECT * FROM {profile_fields} WHERE fid='%d'", $id)))) {
    return drupal_get_form('i18nprofile_translation_field', $field, $language);
  }
  elseif ($type == 'category' && $id) {
    return drupal_get_form('i18nprofile_translation_category', $id);
  }
  else {
    return i18nprofile_translation_overview();
  }
}