How to translate a drupal module

  1. Download and install the Translation Template Extractor (POTX).
  2. Use POTX to extract from the installed module a .pot template, that is, a file that includes the untranslated strings in english.
  3. Download and install POEdit, the most common string translator.
  4. Use POEdit to create, from the extracted .pot template, the French version of the strings, a file with the .po extension.
  5. Use the locale module to import the new .po file so that the module’s interface appears in french
  6. Create a translations within your the folder of your module, e.g. example/translations
  7. As a base for other translations, place the .pot file (example.pot) which you created in step 2. above within the translations folder. example/translations/example.pot
  8. Place the extracted .po from step 4. there as e.g. fr.po for a french translation, too. example/translations/fr.po

Leave a Reply

Your email address will not be published. Required fields are marked *