I am implementing multilingual support for my contact_forms module and just need to add

'page_title' => t('Page Title'),
'page_info' => t('Additional Information'),

to the object defined by i18n_contact_i18n_object_info()
in i18n_contact.i18n.inc

Here is the code in a module I have called contact_forms_int. The hook is being run but the changes are not being made.
can you see anything that I am doing wrong?

function contact_forms_int_i18n_object_info_alter(&$info) {

    $info['contact_category']['string translation']['properties'] = array(
        'category' => t('Category'),
        'page_title' => t('Page Title'),
        'page_info' => t('Additional Information'),
        'reply' => t('Auto-reply'),
      );
}

here is the original hook_i18n_object_info()

/**
* Implements hook_i18n_object_info().
*/
function i18n_contact_i18n_object_info() {
  $info['contact_category'] = array(
    // Generic object title.
    'title' => t('Contact category'),
    // The object key field.
    'key' => 'cid',
    // The object load callback.
    'load callback' => 'contact_load',
    // Placeholders for automatic paths.
    'placeholders' => array(
      '%contact' => 'cid',
    ),
    // To produce edit links automatically.
    'edit path' => 'admin/structure/contact/edit/%contact',
    // Auto-generate translate tab.
    'translate tab' => 'admin/structure/contact/edit/%contact/translate',
    // Properties for string translation.
    'string translation' => array(
      // Text group that will handle this object's strings.
      'textgroup' => 'contact',
      // Object type property for string translation.
      'type' => 'category',
      // Table where the object is stored, to automate string lists
      'table' => 'contact',
      // Translatable properties of these objects.
      'properties' => array(
        'category' => t('Category'),
        'reply' => t('Auto-reply'),
      ),
      // Path to translate strings to every language.
      'translate path' => 'admin/structure/contact/edit/%contact/translate/%i18n_language',
    )
  );
  return $info;
}

Comments

Fixed

I found by putting my code in contact_forms_int.module it worked. I had it in contact_forms_int.i18n.inc.

Regards
Geoff

Regards
Geoff
The user previously known as gpdinoz

nobody click here