Translating The Theme

Translating The Theme

13/12/2018

Within this section, you’ll find everything you need to localize and internationalize the Avada theme into your language. It is split into several subsections to help you easily find what you need. The Avada theme and the Fusion Builder and Fusion Core plugin, that are bundled with the theme, are translated separately. Let's take a look at translating Avada first.

IMPORTANT NOTE: To fully translate the theme, please take note that you must also translate Fusion Builder and Fusion Core plugin. View our articles about Translating Fusion Builder and Translating Fusion Core.

Translatable Theme Features

  • Frontend - The Frontend of the theme; such as the Contact form, the "All" string on Portfolio filters, Blog pages set as the Home page, or Blog pages from WordPress' Reading Settings.
  • Fusion Theme Options - The Fusion Theme Options and all the options included in it; such as General options, Site Width options, Header options and the like.
  • Fusion Page Options -The Fusion Page Options and all the options included in it; such as Post options, Page options, Sliders options and the like.

Theme Translation Basics

This section will explain where you can find the files needed for translation and what these files are for. Avada 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 Avada main theme folder, you will find a folder called languages. If you have downloaded the Installable WordPress Package file, you will find this file in the languages folder:

    • Avada.pot - A list of all the text strings used in the Theme 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 Avada to the Deutsch language, the filenames would be Avada-de_DE.po and Avada-de_DE.mo. View screenshot here.

    Please see the next sections for detailed instructions on how to do so.

    Language Code

    Using the correct language code is an important factor to successfully translating the theme. 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.

    IMPORTANT NOTE: This feature is only for Avada 3.8 or higher.

    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 Avada.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 theme, 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 and .pot 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 Avada.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 Avada-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, select the Edit button, then select the Find option. View screenshot here.

    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.

    IMPORTANT NOTE: Everytime you update the .po file, make sure to upload both .po and the compiled .mo file to the correct folder, which is wp-content/languages/themes. Also make sure that they have the correct file names. The correct file name is the theme name and your language code. For example, Avada-de_DE.po.

    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 theme, 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 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. View screenshot here.

    Step 3 - In the opening file dialog, choose the Avada.pot file in Avada/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 here.

    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 here.

    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.

    Recent Posts

    Recent Tweets

    For privacy reasons Twitter needs your permission to be loaded. For more details, please see our Privacy Policy.
    I Accept