How to generate translation file for a custom Drupal 7 module?

后端 未结 1 1875
自闭症患者
自闭症患者 2021-01-30 18:11

I\'m using CentOS 5.5 Linux (without X), PHP 5.3 and Drupal 7.0.

The core language of my site is Russian (not English)!

I\'ve created a game.info

1条回答
  •  清歌不尽
    2021-01-30 19:09

    These should be the steps:

    1. To generate the .pot file, install the module Translation template extractor

    2. Go to the "Extract strings" tab on the Locale administration interface, select your module and submit the form. You will get one single template file generated.

    3. Then you can translate the strings with a tool like Poedit (http://www.poedit.net).

    4. When you are done, files should be copied to a "translations" sub-folder in the module folder, so they are automatically imported by Drupal when installing your game module.

    Please, give feedback and tell what problems did you have. Thanks

    0 讨论(0)
提交回复
热议问题