Tag Info

New answers tagged

0

You can do this with the WordPress tools, without POEdit. First, do an svn checkout of http://develop.svn.wordpress.org/trunk/: svn co http://develop.svn.wordpress.org/trunk/ wpdev Then, switch to the i18n tools directory in it: cd wpdev/tools/i18n/ Then just run the makepot.php over your theme's directory: php makepot.php wp-theme /path/to/your/theme ...


1

Here is how you can create a .pot file for your theme with Poedit (free edition, version 1.6.10) on OS X. Best practise is to save language files in a folder named "languages" in your theme directory. If you haven't already, create it before you start. In Poedit: In the "File" menu select "New" Select the language that you used in your theme (probably ...


1

You have slight timing issues because you generate title first (in constructor call), but postpone text domain load to later (init at default priority). Text domain mus be loaded for __() to translate correctly. Those are not “lazy”, they generate and return strings right where they are called. Text domain should be loaded very early, Codex recommends at ...


0

Ok for everyone else's benefit this is what is not explained in the documentation: You need to specify a textdomain anyway in your plugin (and together with it the path to the directory containing the language files, as usual). The PHP file used for the translation should contain an array like: $strings = array( 'string1' => esc_js( __('Your text ...



Top 50 recent answers are included