You are here

function i18n_page_translate_tab in Internationalization 7

Translate or localize page for object

1 string reference to 'i18n_page_translate_tab'
i18n_page_menu_items in ./i18n.pages.inc
Create menu items for translatable objecs

File

./i18n.pages.inc, line 69
Generic translation pages

Code

function i18n_page_translate_tab($type, $object, $language = NULL) {

  // Check whether object should be part of a translation set
  switch (i18n_object($type, $object)
    ->get_translate_mode()) {
    case I18N_MODE_TRANSLATE:
      return i18n_page_translate_translation($type, $object);
    case I18N_MODE_LOCALIZE:
      return i18n_page_translate_localize($type, $object, $language);
    default:
      drupal_access_denied();
  }
}