Within this section, you’ll find everything you need to localize and internationalize the Fusion Builder Plugin that is bundled along with the theme into your language. It is split into several subsections to help you easily find what you need. The process of translating the Fusion Builder plugin is very similar to translating the Avada theme, except for some naming conventions. Let’s take a look at translating the Fusion Builder plugin!
In the Fusion Builder plugin files, the following features can be translated:
- Frontend – The Frontend for the shortcodes, including the Blog shortcode.
- Shortcode Generator – The Shortcode Generator along with it’s items.
- Fusion Page Builder – The Fusion Page Builder along with it’s builder elements.
Plugin Translation Basics
To further understand how translating the plugin works, we’ve included this section to explain where you can find the files needed for translation and what these files are for. Fusion Builder comes with a steadily growing number of available languages, which can be downloaded from our public GitHub Repo. These are pre-defined translations, powered by our user base. You can see usage details here: Included Language Files
If your language is not already part of our repository, you can easily create your own translation files. Inside the Fusion Builder main plugin folder, you will find a folder called languages, and inside of it this file:
- fusion-builder.pot – This file is basically a list of all the text strings used in the Plugin files. These text strings are in the English language, and can contain a translation for each text string.
This file can be used as a starting point to create your own translations, using e.g. a third party tool like POEdit.
In order for WordPress to recognize the resulting language files, you must name them accordingly using the ISO Language Codes. For example, if you wanted to translate Fusion Builder to the Deutsch language, the filenames would be Avada-de_DE.po and Avada-de_DE.mo.
Please see the next sections for detailed instructions on how to do so.
Using the correct language code is an important factor to successfully translating the plugins. If you are using Avada 3.8 or higher, we have added a System Status tab where you can easily see which language code you’re using. Please continue reading below for more information on how this is done.
How To Identify The Language Code You’re Using
Step 1 – Go to the Avada > System Status tab.
Step 2 – Under the WordPress Environment section, you will find a field called Language. the code located in this field is your language code. For example, en_US.
The Translation Process
If your language is not already included, the only thing you have to do is to create a new .po file from the original fusion-builder.pot located in the languages folder, translate all text strings, then save the .po file with your language code and make sure the corresponding .mo is created, which can be read by WordPress. The next subsection will explain this in detail. If you only want to change translated strings in an included .po file, the same steps apply.
Either you are setting up a completely new language file or you just want to edit translated pre-built language files, the steps to take are easy and more or less the same.
The language files can also be used if you only want to translate a small portion of the theme, or one specific area. You do not have to translate the entire plugin, you can choose what you translate inside the Avada.po file. This is the preferred method for translation.
How To Edit The .po file With 3rd Party Software
There are different editors out there for the purpose of editing .po files, but POEdit is easy to use, it is available for all platforms and it is freeware. To download POEdit, follow this link.
How To Start A New Language From Scratch
Step 1 – Open the fusion-builder.pot in POEdit by selecting ‘New from POT/PO file…’. Once it has loaded, you will find all English text strings in the left column called Source Text. Once you add translations, they will show up in the right column under Translation.
Step 2 – Choose the line you want to translate. In the lower right section of the POEdit window, you will find a text area where you can add the correct translation.
Step 3 – When you are done translating all the needed text strings into your desired language, save the file with the theme name and your language code. For example, if you were translating to the Deutsch language, you would save it as fusion-builder-de_DE.po. The corresponding .mo file will be auto created.
How To Edit A Pre-Built Language File
Step 1 – Open the .po file of your preferred language in POEdit and search for the line you want to change. To do this in Windows, select the Edit button, then select the Find option. To do this in OSX, select the Edit button, then select the Search option.
Step 2 – In the Search Window, type the text string you are looking for. Once it is selected, replace the text in the Translation text area in the lower part of the window with your prefered translation.
Step 3 – If you’d like to edit another text string, just repeat Steps 1 to 2.
Step 4 – Once you’re happy with your translations, Save the file. The updated .mo file will be auto created.
Updating The Translations Catalogue
Updating the Translations Catalogue usually isn’t required. However, if you want to retain your customized Language file, and new strings have been added to a new version of the plugin, then you can choose to update from the .pot file to include the new strings to your current Language file. Another reason why updating the Translation Catalogue might be a good idea is if text strings have been added or edited through a Knowledgebase fix. You may need to update the catalogue of your existing .po file to reflect these changes.
How To Update From The .po File After A Plugin/Theme Update in POEdit
Step 1 – Open the .po file of the desired language in POEdit.
Step 2 – Choose ‘Catalogue’ from the options in the toolbar, then select ‘Update from POT file’ option.
Step 3 – In the opening file dialog, choose the fusion-builder.pot file in fusion-builder/languages/ folder. The catalogue will then be auto updated with all the new text strings, and your custom ones will be preserved.
Step 4 – Don’t forget to Save the file once you are done updating and adding translations.
How To Update The Catalogue After Downloading Patches in POEdit
Step 1 – After applying patches, open your existing language file in POEdit and click ‘Catalogue’ in the toolbar, then select the Properties option.
Step 2 – In the opening file dialog, click the Sources Paths tab. Click the New Item icon. After that, Set the path to “../” (two periods and a backslash) as illustrated in the screenshot below.
Step 3 – In the Sources Keywords tab, click the New Item icon. First add “__” (two underscores) and then “_e” (an underscore and the letter e) as illustrated in the screenshot below.
Step 4 – Click OK to close the window. Once you’re in the main screen, click Update icon. Now POEdit will search for all new strings in Avada. Once they are imported, you can translate them to your desired language.