You are here

function _translation_table_row in Translation table 6

Same name and namespace in other branches
  1. 7 includes/admin.inc \_translation_table_row()

One row of the translation table.

Parameters

$source: source string record

$languages: languages to translate to

Return value

table row for theme_table

5 calls to _translation_table_row()
content_translation_table_cck_filtered_form in modules/content.translation_table.inc
Form for CCK translation.
menu_translation_table_menu_filtered_form in modules/menu.translation_table.inc
Form for menu translation. Note: If the menu string is not in the locales_source table, then it won't be displayed.
node_translation_table_nodetype_filtered_form in modules/node.translation_table.inc
Form for node type translation. Note: If the node type is not in the locales_source table, then it won't be displayed.
quicktabs_translation_table_quicktabs_filtered_form in modules/quicktabs.translation_table.inc
Form for quicktabs translation.
taxonomy_translation_table_taxonomy_filtered_form in modules/taxonomy.translation_table.inc
Form for taxonomy translation. Note: If term and vocabulary strings are not in the locales_source table, then they won't be displayed.

File

includes/admin.inc, line 38
The administration interface.

Code

function _translation_table_row($source, $languages) {
  $form['source'] = array(
    '#type' => 'markup',
    '#value' => check_plain($source->source),
  );
  $form['location'] = array(
    '#type' => 'value',
    '#value' => check_plain($source->location),
  );
  foreach ($languages as $lang_code => $lang_name) {
    $translation = db_result(db_query("SELECT lt.translation FROM {locales_target} lt WHERE lt.lid = %d AND lt.language = '%s'", $source->lid, $lang_code));
    $form[$lang_code] = array(
      '#type' => 'textfield',
      '#default_value' => $translation,
      '#size' => 35,
      '#maxlength' => NULL,
    );
  }
  return $form;
}