You are here

README.txt in Boxes translation 7

Contents of this file:

1. Description
2. Installation and configuration
3. Usage
4. Troubleshooting


Description
-----------

The i18n (Internationalization) module supports translation of blocks from
Drupal core with i18n_block, however core blocks cannot be exported to code.
This module enables block titles and block content to be exported to code (via
the Boxes module) and then be translated (via i18n_string included with
the i18n module).


Installation and Configuration
------------------------------

Note, this module requires locale, block, boxes, i18n, i18n_string, and the
ctools modules.

1. Download and unzip/untar the module into your Drupal site installation.

2. Ensure that the core block module is enabled before enabling i18n_boxes.

3. Enable the "Boxes translation" module, which should appear within the
Multilanguage section of the Module administration page.

4. Ensure the text formats you will be using for the Boxes body text are
translatable by visiting the "Strings" tab of the Multilingual settings page at
Administration > Configuration > Regional and language > Multilingual settings,
and checking the checkbox for the appropriate text formats.

5. Visit the Admin > Structure > Blocks page.  You will see a new option link
next to the "+ Add block" link called "+ Add translatable box".


Usage
-----

1. This module adds a "+ Add translatable box" link to the Block administration
page at Admin > Structure > Blocks.

2. After you add a translatable box, you're given the option to select the
Multilingual settings for the content. Select "All languages (Translatable)",
and specify the Box machine name, the administrative title, the Box title, and
the Box body -- all these should be in the site's *default language*.

3. Save the box, and enable it for display, by placing it into a region on the
Block administration UI (or Panel, if you use panels module).

4. Translating boxes.

There are two ways to translate boxes, via the translation interface in the
Drupal administrative section provided by i18n_strings module, or (optionally)
via the on-screen translation provided by the l10n_client module.

4.a) Translating boxes via i18n_strings

Visit the "Translate" tab of the "Translate interface" page at Administration >
Configuration > Regional and language > Translate interface.  Search for the
text strings you just created for the box title and box body by specifying them
in the search box. Translate them using the interface provided, for each
additional language you have enabled.

Visit the translated version of the page containing the translatable box to
verify that the string was translated. The method to change interface language
varies depending on how the locale module is configured for language detection
on your site. Refer to the locale module documentation for further configuration
information.

4.b) Translating boxes using the on-screen l10n_client.

Ensure the l10n_client module is enabled and configured properly, and that you
have permission to see the blue translation bar on the site's front-end.

Visit any page that contains the translatable box you created and enabled in
steps 2 and 3 above. Expand the l10n_client blue bar at the bottom of the page
and search for the text you wish to translate.  Specify the text and save.

5. Exporting boxes.

The default language version of each translatable box may be exported to php
code, typically using the Features module.  You may also wish to export the
translated versions from the database to .po files using the I18n module's
export feature.

Troubleshooting
---------------

Problem: Missing "+ Add translatable box" link on Admin > Structure > Blocks.

Solution: In certain circumstances, is possible that the installation script gets run
before the block module (a dependency of this module) has been enabled. This
will cause the "+ Add translatable box" link to disappear.  Disable and reenable
this module to force the module weight to be higher than that of the block
module, which should remedy the problem.


Problem: The string boxes:i18n:machine_name:body for textgroup boxes is not
allowed for translation because of its text format.

Solution: You need to make your text formats translatable in the Multilingual
settings.  Go to the "Strings" tab of the Administration > Configuration >
Regional and language > Multilingual settings, and check the checkbox for the
input format(s) you intend to make translatable.

File

README.txt
View source
  1. Contents of this file:
  2. 1. Description
  3. 2. Installation and configuration
  4. 3. Usage
  5. 4. Troubleshooting
  6. Description
  7. -----------
  8. The i18n (Internationalization) module supports translation of blocks from
  9. Drupal core with i18n_block, however core blocks cannot be exported to code.
  10. This module enables block titles and block content to be exported to code (via
  11. the Boxes module) and then be translated (via i18n_string included with
  12. the i18n module).
  13. Installation and Configuration
  14. ------------------------------
  15. Note, this module requires locale, block, boxes, i18n, i18n_string, and the
  16. ctools modules.
  17. 1. Download and unzip/untar the module into your Drupal site installation.
  18. 2. Ensure that the core block module is enabled before enabling i18n_boxes.
  19. 3. Enable the "Boxes translation" module, which should appear within the
  20. Multilanguage section of the Module administration page.
  21. 4. Ensure the text formats you will be using for the Boxes body text are
  22. translatable by visiting the "Strings" tab of the Multilingual settings page at
  23. Administration > Configuration > Regional and language > Multilingual settings,
  24. and checking the checkbox for the appropriate text formats.
  25. 5. Visit the Admin > Structure > Blocks page. You will see a new option link
  26. next to the "+ Add block" link called "+ Add translatable box".
  27. Usage
  28. -----
  29. 1. This module adds a "+ Add translatable box" link to the Block administration
  30. page at Admin > Structure > Blocks.
  31. 2. After you add a translatable box, you're given the option to select the
  32. Multilingual settings for the content. Select "All languages (Translatable)",
  33. and specify the Box machine name, the administrative title, the Box title, and
  34. the Box body -- all these should be in the site's *default language*.
  35. 3. Save the box, and enable it for display, by placing it into a region on the
  36. Block administration UI (or Panel, if you use panels module).
  37. 4. Translating boxes.
  38. There are two ways to translate boxes, via the translation interface in the
  39. Drupal administrative section provided by i18n_strings module, or (optionally)
  40. via the on-screen translation provided by the l10n_client module.
  41. 4.a) Translating boxes via i18n_strings
  42. Visit the "Translate" tab of the "Translate interface" page at Administration >
  43. Configuration > Regional and language > Translate interface. Search for the
  44. text strings you just created for the box title and box body by specifying them
  45. in the search box. Translate them using the interface provided, for each
  46. additional language you have enabled.
  47. Visit the translated version of the page containing the translatable box to
  48. verify that the string was translated. The method to change interface language
  49. varies depending on how the locale module is configured for language detection
  50. on your site. Refer to the locale module documentation for further configuration
  51. information.
  52. 4.b) Translating boxes using the on-screen l10n_client.
  53. Ensure the l10n_client module is enabled and configured properly, and that you
  54. have permission to see the blue translation bar on the site's front-end.
  55. Visit any page that contains the translatable box you created and enabled in
  56. steps 2 and 3 above. Expand the l10n_client blue bar at the bottom of the page
  57. and search for the text you wish to translate. Specify the text and save.
  58. 5. Exporting boxes.
  59. The default language version of each translatable box may be exported to php
  60. code, typically using the Features module. You may also wish to export the
  61. translated versions from the database to .po files using the I18n module's
  62. export feature.
  63. Troubleshooting
  64. ---------------
  65. Problem: Missing "+ Add translatable box" link on Admin > Structure > Blocks.
  66. Solution: In certain circumstances, is possible that the installation script gets run
  67. before the block module (a dependency of this module) has been enabled. This
  68. will cause the "+ Add translatable box" link to disappear. Disable and reenable
  69. this module to force the module weight to be higher than that of the block
  70. module, which should remedy the problem.
  71. Problem: The string boxes:i18n:machine_name:body for textgroup boxes is not
  72. allowed for translation because of its text format.
  73. Solution: You need to make your text formats translatable in the Multilingual
  74. settings. Go to the "Strings" tab of the Administration > Configuration >
  75. Regional and language > Multilingual settings, and check the checkbox for the
  76. input format(s) you intend to make translatable.