LoginSignup
1
1

More than 5 years have passed since last update.

WPMLでストリング翻訳を使用する

Last updated at Posted at 2017-01-20

テーマの中では __('English string','theme-text-domain') あるいは _e('English string' ,'theme-text-domain') を使って文字列を書いておく。
後者の e は echo の意。
前者は文字列を変数として扱い、後者は文字列をブラウザに表示する。

「WPML > テーマをプラグインローカライゼーション」画面において「WPMLのString Translationを使用してテーマとプラグインを翻訳する」を選んで保存しておく。

同画面の「テーマ内のストリング」の「ストリング用のテーマをスキャンする」をクリック。
「翻訳が必要なストリングを見る」をクリック
翻訳して、翻訳完了、保存する。

参考:
https://wpdocs.osdn.jp/I18n_for_WordPress_Developers
https://wpml.org/ja/faq/なぜストリング翻訳が表示されないか?/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1