As of v0.9.4.0+

This is a draft article.

If the language pack is available for your language in translate.wordpress.org and you have set the same language in your WordPress site setting, you can look for translation updates in the updates section of WP Admin.

Click here to check whether your language pack is already available.

In this article
What sections of the plugin are translatable?
How to add new language(or starting from scratch) using Loco Translation plugin v2.5.3+.
How to starting from using translated contents for WPCal from WordPress? Just do this one time setup.
How to update strings or Add missing translation of existing language using Loco Translation plugin v2.5.3+.

Do you want to contribute translations of our plugin see How to contribute to WPCal plugin translations?

What sections of the plugin are translatable?
End user - booking widget
All emails (Invitee emails & admin emails).
API contents - Event created in Third-party calendar like Google Calendar.

Follow the steps below to translate the plugin for your site manually

This is assuming you have already installed and activated WPCal v0.9.4.0+ plugin in your site.

In this article we have used French used in France as an example its locale code fr_FR.

Having any doubts or want to generate MO, JSON files from PO file mail us.
If you have any doubts mail us at support@wpcal.io, we are ready to guide you step by step.

If you want us to generate the MO and JSON files.
Mail your .po file to support@wpcal.io, we will generate the MO and JSON files and send you.
Download the language files and upload it to your site in /wp-content/languages/plugins/ directory.
We will not use your translations without your permission.

How to add new language(or starting from scratch) using Loco Translation plugin v2.5.3+.

Please take backup of your language files of WPCal plugin.

Download, Install and Activate Loco Translation plugin plugin in your WP site if not already present.
Navigate WP Admin › Loco Translate › Plugins › WPCal.
In the Overview tab, click on New Language.
Now choose the language you like to translate and select a desired location
Custom: languages/loco/plugins/wpcal-fr_FR.po - (Recommended) This location will Not be overwritten by WP translation updates.
System: languages/plugins/wpcal-fr_FR.po - This location will be overwritten when a translation update is done.

Replace 'fr_FR' with your language locale code in the file name.
Now you can enter the translation and each text you want and save it.
It will show "OK: PO file saved and MO/JSON files compiled" or something similar.

How to starting from using translated contents for WPCal from WordPress? Just do this one time setup.

Because WP always delivers purged po file from translate.wordpress.org which doesn't contain JS translation(json), to get all translation please do the following steps once.

Please take backup of your language files of WPCal plugin.

Go to https://translate.wordpress.org/projects/wp-plugins/wpcal/ carefully select desired language.
Then click on "Stable (latest release)"
Then in bottom of the page near Export, choose "all current" as "Portable Object Message Catalog (.po/.pot)"
Then click on Export
Save as "wpcal-{locale}.po" as per our example "wpcal-fr_FR.po" in your computer.
Loco > Plugins > WPCal.io choose "Upload PO"
Select a desired location
Custom: languages/loco/plugins/wpcal-fr_FR.po - (Recommended) This location will Not be overwritten by WP translation updates.
System: languages/plugins/wpcal-fr_FR.po - This location will be overwritten when a translation update is done.

Replace 'fr_FR' with your language locale code in the file name.
Choose the file in your computer and click "Upload" button.

Remember this will overwrite all existing translations with same locale or filename.
Now you can start translating missing translation if any.

How to update strings or Add missing translation of existing language using Loco Translation plugin v2.5.3+.

If you gonna translate on top of WordPress delivered translation for WPCal and if you not done one time setup, click here to see it. If you already started from scratch you can continue.

Please take backup of your language files of WPCal plugin.

Download, Install and Activate Loco Translation plugin plugin in your WP site if not already present.
Navigate WP Admin › Loco Translate › Plugins › WPCal.
Mouse hover on desired language click Edit.
Now you can enter the translation and each text you want and save it.
It will show "OK: PO file saved and MO/JSON files compiled" or something similar.

How to manually translate the plugin using text files.

Step 1) Create a .po file and enter translations

Duplicate the wpcal.pot file available in the /wpcal/languages/ directory and rename it as wpcal-{locale}.po
Open the PO file, and you can see sets of
msgid "Some source string"
msgstr ""

Please enter translated string within msgtr "" like
msgid "Some source string"
msgstr "Une chaîne source"

Similarly do it for all string that you required and save it.

Now PO file is ready.

Step 2) Generating .json files after .po file is ready with translations

Please visit https://localise.biz/free/converter/po-to-json
Choose source file: choose the .po file that you created in Step 1, maybe download in your desktop for uploading.
Choose source language as "English (USA)" and desired Translation Language.
In the section "To:" Choose "JSON" and then "Jed Gettext", then click Convert.
Download the file and save it as "`wpcal-fr_FR-edf0c96da6429aaca93bc791b8486a1b.json`" where fr_FR should be replaced with your locale and edf0c96da6429aaca93bc791b8486a1b is md5 of 'dist/js/chunk-common.js'
Edit the file add the following line in the start of the file
{"locale_data":
add the following line at the end of the file
}
Minify the JSON file, maybe you can use https://codebeautify.org/jsonminifier and save it in the file.
Upload the file in /wp-content/languages/plugins/ of your WordPress site.
Was this article helpful?
Cancel
Thank you!