Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hey Guys,

    I could find a solution for this problem:

    1. first of all you have to create a Divi child theme. Find more details about divi child theme here: https://www.elegantthemes.com/blog/divi-resources/divi-child-theme
    2. you have to add the following lines to the child theme’s functions.php file:
      /** Add polylang to Divi Library Window */
      
      add_filter('pll_get_post_types', 'my_pll_get_post_types');
      function my_pll_get_post_types($types) {
      	return array_merge($types, array('et_pb_layout' => 'et_pb_layout'));
      }

      It enables polylang plugin to see divi library. This code is by daddydodo

    3. Use the Theme Builder, and in your custom built Header / Footer now save specific elements (eg. text elements) as a global element to Divi Library. ?? Useful to add the current language to the name like “Short About EN”.
    4. If you go to the Divi Library, now you can see that specific element listed, and you can add translation of the modul
    5. I chose the way to add the translation to make a new library modul and import the global modul (eg. Short About EN) to translate. Its important that after you imported the modul you have to remove the imported modul as a global element, otherwise if you edit the element, like change the text, also the original source modul’s text also will change.
    6. Don’t forget to connect different languages like on pages or posts
    7. Done, the Polylang plugin automatically will use the right language element
    • This reply was modified 4 years, 10 months ago by benceszemerey.
    • This reply was modified 4 years, 10 months ago by benceszemerey.
Viewing 1 replies (of 1 total)