You are here

function theme_i18n_admin_manage_screen in Internationalization 5.2

Same name and namespace in other branches
  1. 5.3 i18n.module \theme_i18n_admin_manage_screen()
  2. 5 i18n.module \theme_i18n_admin_manage_screen()

Theme the locale admin manager form.

File

./i18n.module, line 955
Internationalization (i18n) module

Code

function theme_i18n_admin_manage_screen($form) {
  foreach ($form['name'] as $key => $element) {

    // Do not take form control structures.
    if (is_array($element) && element_child($key)) {
      $rows[] = array(
        check_plain($key),
        drupal_render($form['name'][$key]),
        drupal_render($form['native'][$key]),
        drupal_render($form['enabled'][$key]),
        drupal_render($form['site_default'][$key]),
        drupal_render($form['rtl'][$key]),
        $key != 'en' ? drupal_render($form['translation'][$key]) : t('n/a'),
        $key != 'en' ? l(t('delete'), 'admin/settings/locale/language/delete/' . $key) : '',
      );
    }
  }
  $header = array(
    array(
      'data' => t('Code'),
    ),
    array(
      'data' => t('English name'),
    ),
    array(
      'data' => t('Native name'),
    ),
    array(
      'data' => t('Enabled'),
    ),
    array(
      'data' => t('Default'),
    ),
    array(
      'data' => t('RTL'),
    ),
    array(
      'data' => t('Translated'),
    ),
    array(
      'data' => t('Operations'),
    ),
  );
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}