Existing Supported Languages
The Divi Assistant settings include a lot of text! To accommodate different languages, we have added language translation support to all the text in Divi Assistant. When you change the Site Language in WordPress General Settings, the language of the Divi Assistant interface will change accordingly. Note this only works if your language is already supported. So far, we have included:
- Spanish
- French
We invite users of other languages to complete the translations with the instructions below and share the files with us to be included in the next update for others to benefit.
Adding New Language Support for Divi Assistant
To create and add new language support for the Divi Assistant plugin, please follow these detailed instructions. This will help users of different languages feel comfortable handling the translation process, and once complete, you can share the files with us to include in the next version of the plugin. By doing this, you are helping everyone in your language community!
1. Install Translation Tools:
Loco Translate:
Install the Loco Translate plugin for translation.
Automatic Translate Addon for Loco Translate:
Install the Automatic Translate Addon For Loco Translate for automatic translation.
2. Prepare for Translation:
Ensure you have the correct POT file. Rename the pot file from pac-divi-assistant.pot
to divi-assistant.pot
if necessary.
3. Translate the Plugin:
- Go to
Loco Translate -> Plugins
and selectDivi Assistant
. - Click
Add New Language
. - Select the desired language and change the location to
Author
. - Click
Auto Translate
. - Select
Yandex
and clickTranslate
, then clickMerge
. - Add any missing translations manually and click
Save
.
4. Generate JSON File for JavaScript Translations:
- Go to the plugin folder and copy the
.po
file to an easily accessible location. - Visit WPE Form Tools: PO to JSON.
- Fill in the details:
- Script Handle:
pac_bundle_js
- Translation Domain:
pac-divi-assistant
- Locale ID: e.g.,
fr_FR
for French,es_ES
for Spanish, etc.
- Upload the
.po
file. - Click
Generate JSON
.
5. Implement the JSON File:
- Copy the generated JSON file to the
Languages
folder in the plugin. - Rename the file to match this format:
pac-divi-assistant-[Locale ID]-pac_bundle_js.json
(e.g.,pac-divi-assistant-fr_FR-pac_bundle_js.json
for French).
6. Final Steps:
- Verify that the translations appear correctly in the plugin settings UI.
- Once confirmed, share the translation files with us to include in the next plugin version. This contribution will help others in your language community.
Example:
- For a French translation, the JSON file should be named:
pac-divi-assistant-fr_FR-pac_bundle_js.json
.
Important Note:
If you encounter any issues, such as the plugin not being ready for localization, please ensure that the POT file is correctly named and located. If problems persist, feel free to reach out for support.