- #Poedit wordpress how to
- #Poedit wordpress portable
- #Poedit wordpress code
- #Poedit wordpress download
Open up Poedit and select File > New to create a new translation project.pot file you can open it in Poedit and skip step 13 and 14. po file with the translations left empty so we can rename our final output.
pot file for your WordPress translation is easy with Poedit, but it can be a little confusing since Poedit forces you to generate a.
#Poedit wordpress how to
I won’t be offended if you stop reading this article and grab the Pro version, but if you’d like to know how to set up a WordPress translation manually, read on. There’s also a Pro version available that automates some the following process and can be used to start creating actual translations from both humans and machines, and at $20 it’s a great deal.
#Poedit wordpress download
Setting up Poedit for your WordPress Translationįirst, you’ll want to download Poedit. pot file by hand, rigorously going through your theme and looking for all the translatable function and transcribing it into a. If you use the _s starter theme to build themes from scratch you’ll see an example.
#Poedit wordpress portable
pot ( portable object template) file for your theme. In order to easily create those translations, or allow others to, you need to generate a. "Faites des recherches dans leur base de données afin de trouver ce que vous " Msgid "Try a search to find what you're looking for."
#Poedit wordpress code
It uses the WordPress translation code to do some of the work.Msgid "Oops! That page can’t be found" So you need the whole checkout, not just the tools directory. Note that the makepot.php code is not standalone, it requires that WordPress's source code be available. If you used any special translation methods like _x or _ex or _n_noop, then those will be in the file as well. Note that the headers of the plugin are included in the POT file too. You may want to edit its header (in any text editor) to have your author and plugin info in it and such.Ĭompare the results yourself. The PHP code will scan your plugin's directory and build a POT file for you.Ī POT file is a "PO Template", which poedit can handle quite nicely, I believe. Replace the path to your plugin's folder with the relevant local copy of the plugin, and use your own plugin's slug for the pot file name. You can also use wp-theme here to generate a POT file for a theme. The "wp-plugin" flag is telling the code to examine a plugin. Php makepot.php wp-plugin /path/to/your/plugin/folder plugin-slug.pot Here you will find a file called makepot.php. Go into that directory, then in the tools directory, then in the i18n directory. (Note: If you are a git user, you can make a clone of git:/// instead.) You may not need all of these tools, but there is one that you do need. This will get you a copy of the WordPress trunk directory, and the special tools developers need with it. This has the advantages of a) not needing you to do anything special in poedit and b) getting everything that is possible for translation, including headers and non-standard translation string calls (not everything is _ and _e). Instead of using poedit to generate your translation strings from your code, use the WordPress i18n tools to generate a POT file for you. So my guess is I'm doing something wrong in my WP files. But if I put this on my website and change WordPress it's language it doesn't change anything. po file, it does show me strings in POedit. Is anyone seeing where it's going wrong here? I tell poedit to look for the keywords _() and _e().Īnd then I press ok! Every single time (whatever I seem to try) It doesn't show me any strings to translate, where as I import a normal. admin or admin (if I give it /admin, or something else, it gives me an error the folder doesn't exist. I tell poedit to save the myplugin-nl_NL.po in the languages folder in my plugin.Īnd I tell my paths to be either. Then I adjust all strings that need translation in my file (which is in the admin folder). Load_plugin_textdomain( 'myplugin', false, dirname( plugin_basename( _FILE_ ) ). So in myplugin.php I load the following to tell WP where my language files are (after actually creating the folder). So let's do this step by step as multiple tutorials show me to. I don't know what is going wrong, but it's bugging out on me when I try to load it in Poedit. I want to start making it localization ready. I'm building a plug-in which is going great so far.