Create translations
A guide on how translate the plugin if your desired translation is not bundled.
Last updated
A guide on how translate the plugin if your desired translation is not bundled.
Last updated
If you wish to translate the plugin to a new language, you have many options. Here we illustrate the "easy" way, and the "hard" way.
LocoTranslate is a handy WordPress plugin that allows you to manage translations within your WordPress dashboard. It provides in-browser editing of WordPress translation files and integration with automatic translation services.
After installing the plugin, go to LocoTranslate dashboard and select TheBooking.
A listo of already present languages appears. To create a new translation, click on New Language.
In the screen that follows, choose the desired language. Then select the folder in which the translation files should be stored. Our suggestion is to select the /languages/plugins
directory instead of the default one, so that translation files are not removed by a plugin update.
Finally, click on Start translating.
Provide the proper translation for each string of the list, and don't forget to save the translation when done.
This process requires you to send us the translation files, as some JSON files need to be generated from the po/mo generated by PoEdit.
Using PoEdit, you must open the team-booking.pot
file. PoEdit will notify you that the .pot file is only a template, and offers to create a new translation.
Press the button, select your language, and begin the translation work. For each string, just write your translation in the Translation field.
When you've finished with your translation, press the Save
button, and you'll be asked to name your new .po file.
You have to stricly follow the WordPress naming convention, so the file name must start with team-booking- followed by the locale code of your language (i.e. German is de_DE, you can find a list of WordPress locales here).
Pay attention to the name of the file and to the locale code, otherwise WordPress won't be able to load the translations.
When saved, PoEdit automatically generates the .mo file as well.
The process is not yet finished: get in touch with our support, provide those files and the support crew will send back to you a group of new files.
Then you should upload those files to the wp-content/languages/plugins
directory of your website via FTP.
Be sure that your language is correctly selected in the WordPress general settings, and your new translations should be instantly loaded.
Always keep a backup of your new or edited .po/.mo files. If you put or replace them in the original language directory of the plugin, they will be lost after a plugin upgrade. Instead, put them inside the wp-content/languages/plugins
directory and they will be preserved.