Skip to main content
How to Translate the Divi Theme

Learn how to change the default translations that ship with Divi Theme with the help of a Child Theme.

Updated over 3 weeks ago

Translating the Divi Theme into languages not included by default can enhance your website’s accessibility and appeal to a broader audience.

In this article, we will guide you through the process of creating and modifying translation files for the Divi Theme.

Divi is fully translated into 32 Languages and includes RTL support by default. However, there could be cases where your language is not included in the 32 available languages. For those cases, follow these steps:

Setting up WordPress to use your language

  1. Go to WordPress Dashboard → Settings → General → Site language

  2. Select the language you want to use

  3. Save your changes

If no Child Theme is installed, install one

  1. You can download a Divi Child Theme from this GitHub page

  2. Go to Appearance Themes Add New Upload Theme

  3. Choose the zip file you have downloaded from the link above

  4. Click on the Install Now button.

  5. After the installation is completed, click on the Activate link

If a Child Theme is already installed

If you already have a child theme, you first need to make some changes to it.

  1. Use an FTP connection, the hosting File Manager app, or the Advanced File Manager plugin

  2. Navigate to the wp-content/theme/child-theme folder

  3. Create a new folder and name it lang

  4. Inside the lang folder, create two new folders and name them:

    1. theme

    2. builder

  5. Edit the functions.php file and add this PHP code (after the existing code)

    /*================================================
    #Load the translations from the child theme folder
    ================================================*/
    function dt_translation() {
    // Hook into textdomain loading to handle hyphenated filenames
    add_filter('load_textdomain_mofile', function($mofile, $domain) {
    if ($domain === 'Divi') {
    $child_mofile = get_stylesheet_directory() . '/lang/theme/Divi-' . determine_locale() . '.mo';
    if (file_exists($child_mofile)) {
    return $child_mofile;
    }
    }
    if ($domain === 'et_builder') {
    $child_mofile = get_stylesheet_directory() . '/lang/builder/et_builder-' . determine_locale() . '.mo';
    if (file_exists($child_mofile)) {
    return $child_mofile;
    }
    }
    return $mofile;
    }, 10, 2);

    // Load the textdomains
    load_child_theme_textdomain('Divi', get_stylesheet_directory() . '/lang/theme/');
    load_child_theme_textdomain('et_builder', get_stylesheet_directory() . '/lang/builder/');
    }

    // Run after theme setup
    add_action('after_setup_theme', 'dt_translation');

Create the translation files

  1. Install the PO Edit app

  2. Download the Divi language files from this link

  3. Unzip the file

  4. Open the en_US.po file from the Divi / lang folder found in the zip file, using the PO Edit app

  5. Translate all the strings to your language

  6. Save the file as Divi-xx_XX.po - where the xx is your country code. For example, for Romanian, the file name will be Divi-ro_RO.po.

  7. Use an FTP connection, the hosting File Manager app, or the Advanced File Manager plugin to upload the .mo file that the PO edit created during the Save to wp-content/themes/child theme folder/lang/theme

  8. Open the en_US.po file from the Divi / includes / builder / languages folder found in the zip file, using the PO Edit app

  9. Translate all the strings to your language

  10. Save the file as et_builder-xx_XX.po - where the xx is your country code. For example, for Romanian, the file name will be et_builder-ro_RO.po.

  11. Use an FTP connection, the hosting File Manager app, or the Advanced File Manager plugin to upload the .mo file that the PO edit created during the Save to wp-content/themes/child theme folder/lang/builder

At this point you should have translated the Divi core and the Visual Builder to your language.

Did this answer your question?