In this article, we explain how you can use the Loco Translate WordPress plugin to create and update translations for Gravity Forms (or an add-on). Loco also has an free online PO file editor but this article focuses on the WordPress plugin.
Getting Started
- Loco Translate is available from the WordPress Plugin Directory and can be installed directly from the Plugins > Add New page of your WordPress Admin.
-
Once installed and activated you will find a new Loco Translate menu item has been added. Here you will find a list of all your installed themes and plugins, including their available translations.
Creating a New Translation
-
To add a translation for a new language click the New language link in the Translations (PO) column of the plugin you want to translate.
-
On the New PO file tab select the language from the drop down of common languages, or enter the language ISO code.
-
You may also be offered the ability to choose where the translation will be stored. To ensure your translation is not lost during updates we would recommend selecting the global languages directory.
Updating an Existing Translation
-
On the Loco Translate packages tab, in the Translations (PO) column, click on the translation you want to update.
-
To pull in any new strings which need translating, and remove any translations for strings which no longer exist in Gravity Forms (or add-on) click the Sync button in the editor toolbar.
Translate those Strings
-
On the editor screen you’ll be presented with a list of all the strings available for translating. Untranslated strings are shown in bold blue.
Select the string you want to translate from the list at the top and then enter your translation in the pane at the bottom.
Translate as many or as few strings as you like.
-
The newly translated string will have a star icon to the left of the string indicating that the changes have yet to be saved.
-
To compile the translation MO file for use by Gravity Forms (or add-on) click the Save button in the toolbar above the list of strings.
Share Your Translation
-
On the Loco Translate editor screen download the translation PO and MO files by using the buttons in the toolbar.
-
Open a support ticket or use our Contact Us form and let us know you would like to contribute your translations. We’ll reply informing you how best to send them to us. Once we have your files we will get them included in the next plugin update and on the Translations page of the support site. We will also credit you in the change log and on the Translations page.
Override bundled Translation
If for any reason you want to override bundled translation for your language with your own customized translation file, just use a FTP client to copy your .mo file to your site /wp-content/languages/gravityforms/
This will make Gravity Forms to use your translation file as first option. If a string is not included in your translation file, it will use the translation from the bundled translation file.