Drupal 的 Translation 是類似
GNU Gettext 的做法
直接用特定函式把要 transalation 的字串包起來,然後用工具 (potx-cli.php) 把這些字串從 code extract 成文字檔,再用一般的 text editor 去修改成 target language。
Translation template extractor (含 potx-cli.php)
http://drupal.org/project/potx
Command line extraction: Copy potx.inc
and potx-cli.php
to the directory you would like to generate translation templates for and run php potx-cli.php
. The translation templates will get generated as separate files in the current directory. Use php potx-cli.php --help
to get a list of command line options.
沒有留言:
張貼留言