Standing on the Shoulder of Linus

Home / 2011 / 6月 / 26 / Debugging Translation

Debugging Translation

This plugin enables to see the source and the target of each translation word/phrase/sentence. When you use other than English locale, all messages that are translated via gettext will be shown in both the source language and the target language.

For example, assume your using a French vesion of WordPress. The word “error” is “erreur” in French, so when you encouter a error, you will see “Il y a une erreur …” Using this plugin, you will see “There is a error …” and “Il y a une erreur …” at the same time, it will be useful when you are reviewing translations.

add_filter('gettext','mytranslate',20,3);
function mytranslate($translated_text,$text,$domain) {
    return $text . $translated_text ;
}

Here is a screenshot for wp-login.php. In this picture, English is the source, and Japanese is the target.

関連

Posted in myplugin | Tagged debug, 翻訳
← gettextフィルタを用いたWordPress管理画面カスタマイズ メッセージを英日併記にするプラグインdebugging translation →

アーカイブ

人気の投稿とページ

  • キンドル本を印刷する(PDFに変換する)方法
  • 名古屋駅から国際センターまでの道のり(徒歩)
  • AGPL ライセンス(GPLとは似ているが違いもある)
  • 問い合わせフォーム改善: 選択肢により条件分岐し、項目の表示非表示を変更する
  • JP-Secure SiteGuard WP Pluginは不正ログイン防止に役立つか

プロフィール

水野史土:月70万PVホームページ制作会社のレスキューワーク株式会社で、PHPソフトウェアのサポートを行っている。concrete5コミュニティリーダー、Novius OSコアコード貢献者でもある。 詳しくは管理者詳細参照。
大好評WordPress書籍「WordPressユーザーのためのPHP入門 はじめから、ていねいに。」サポートページ

Copyright © 2015 Standing on the Shoulder of Linus.