i18n_contact.i18n.inc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * @file
  4. * Internationalization (i18n) hooks
  5. */
  6. /**
  7. * Implements hook_i18n_string_info().
  8. */
  9. function i18n_contact_i18n_string_info() {
  10. $groups['contact'] = array(
  11. 'title' => t('Contact forms'),
  12. 'description' => t('Configurable contact form categories.'),
  13. 'format' => FALSE,
  14. 'list' => TRUE,
  15. );
  16. return $groups;
  17. }
  18. /**
  19. * Implements hook_i18n_object_info().
  20. */
  21. function i18n_contact_i18n_object_info() {
  22. $info['contact_category'] = array(
  23. // Generic object title.
  24. 'title' => t('Contact category'),
  25. // The object key field.
  26. 'key' => 'cid',
  27. // The object load callback.
  28. 'load callback' => 'contact_load',
  29. // Placeholders for automatic paths.
  30. 'placeholders' => array(
  31. '%contact' => 'cid',
  32. ),
  33. // To produce edit links automatically.
  34. 'edit path' => 'admin/structure/contact/edit/%contact',
  35. // Auto-generate translate tab.
  36. 'translate tab' => 'admin/structure/contact/edit/%contact/translate',
  37. // Properties for string translation.
  38. 'string translation' => array(
  39. // Text group that will handle this object's strings.
  40. 'textgroup' => 'contact',
  41. // Object type property for string translation.
  42. 'type' => 'category',
  43. // Table where the object is stored, to automate string lists
  44. 'table' => 'contact',
  45. // Translatable properties of these objects.
  46. 'properties' => array(
  47. 'category' => t('Category'),
  48. 'reply' => t('Auto-reply'),
  49. ),
  50. // Path to translate strings to every language.
  51. 'translate path' => 'admin/structure/contact/edit/%contact/translate/%i18n_language',
  52. )
  53. );
  54. return $info;
  55. }