![]() For this file, we are translating to French for France so we should name it mp-fr_FR.poĬheck out the GNU `gettext’ utilities to find your language and country codes. For example, if you’re translating Chinese for China, the file should be “ mp-zh_CH.po” – mp for the MarketPress plugin, zh for the language and CH for the country. The name is important because there’s a particular format you should follow for consistency. After you hit “OK” you’ll be asked what you want to name your translation file. Enter the details for your translation project in this window. Enter the language you want to translate here along with any other details. A catalog properties box will pop up asking for information about what you are translating. Open Poedit and go to File > New catalog from POT file.ģ. If you didn’t already know, All WPMU DEV plugins come translation ready.Ģ. ![]() Poedit is a free, easy to use open-source program for Mac OS X, Windows and UNIX/Linux for editing PO files and generating MO files.įor this tutorial, we’re going to translate our plugin MarketPress eCommerce into French. ![]() There are many translation tools available, such as GlotPress, Launchpad, and Pootle, but we’re going to use Poedit. MO (Machine Object) files: In the last step, the PO file is converted into a machine-readable format. PO (Portable Object) files: The second step involves translating the text in a POT file into the target language, saving both English and translator messages in a PO file. This file will contain all the text available for translation. POT (Portable Object Template) files: The first step in the translation process is using a program to search through the WordPress source code to pick out text passed into a _() or _e() function, generating a POT file. There are three types of files used in the framework: WordPress uses the GNU gettext localization framework for translation. Unfortunately, the WordPress plugin repository doesn’t allow you to search for plugins that have been localized, so if you download a free plugin it’s best to check the plugin’s features list to see if it is translation ready or contact the developer for more information. This means that strings within the plugin’s code have been localized using the GNU gettext framework.Ĭheck out Everything You Need to Know About Translating WordPress Plugins for the full rundown on how to prepare a plugin for translation.ĭevelopers don’t always create translation ready themes, so when you buy a premium theme make sure to check the plugin’s features list or ask the developer if the plugin has been localized.
0 Comments
Leave a Reply. |