You are here

function i18nviews_object_translate_page in Internationalization Views 7.3

Provide a better organized views translation page grouping strings by display.

Parameters

$view: View object

$langcode: Language code

See also

i18n_string_translate_page_object()

1 string reference to 'i18nviews_object_translate_page'
i18nviews_menu in ./i18nviews.module
Implements hook_menu().

File

./i18nviews.pages.inc, line 21
Views translation page

Code

function i18nviews_object_translate_page($view, $langcode) {

  // Build i18n wrapper and get all strings
  $object = i18n_object('views', $view);
  $strings = $object
    ->get_strings(array(
    'empty' => TRUE,
  ));
  drupal_set_title(t('Translate to @language', array(
    '@language' => i18n_language_name($langcode),
  )));

  // For each string object, objectid = display
  return drupal_get_form('i18nviews_translate_page_form', $view, $strings, $langcode);
}