Support » Plugin: Polylang » Doubt about Divi theme builder in footer and polylang

  • Hello I use the DIVI theme. I would like to use the “Theme builder” to make a different footer for each language.

    It’s possible ?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi there, I’m also having the same question, in my case I’m creating Post Single template and I’m adding “Contact Me” section in the end of the content but I need the title of the section be translatable.

    Is there any way to do this?

    Same problem for me.

    I have a Divi page with 2 languages. I have created a global footer for all pages. So far without problem.

    I am now creating my pages in other language and I am seeing that the footer maintains the original language.

    Could options for choosing templates by language be included in the NEW Divi theme editor?

    Thank you!

    Hello – I have the same question as ciltocruz (@ciltocruz)

    Thank You

    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
    viagozo

    (@dudematters)

    Hi @benceszemerey

    I’ve tried this, but if I want to create a search results page in Divi in more languages (EN and NL). I can’t seem to do this. One language works (Themebuilder – Template – and then select the Search results checkbox) I can only do this for one Template, not for the next language one as the Themebuilder will than disable the first one. How can I make this work for the search results pages in Divi per language?

    I’ve been using this Divi Post to create the search pages: https://www.elegantthemes.com/blog/divi-resources/how-to-create-a-search-results-page-template-in-divi

    • This reply was modified 1 year, 2 months ago by viagozo.
    • This reply was modified 1 year, 2 months ago by viagozo. Reason: Added some comment

    Hi, This isn’t working for me, I have created a footer layout from theme builder, and translated it but the translated version doesn’t display! https://hal.standardtouch.com/

    storytimesolutions

    (@storytimesolutions)

    I am finding the same need as I convert a client to Divi who has a large site with Polylang. I tried the Child Theme route to attempt to have two Divi Library items that are linked similar to posts and pages but that isn’t working for me nor can I really edit them with the Visual Builder for some reason.

    I am hoping to find a better answer but my current approach to solve the immediate need is a CSS solution. Not loving I have to do this but it works.

    My solution is to:
    1) Use the Theme Builder to build whatever component you want (Global Footer in my case)
    2) Create two identical sections for each language (one for English and one for Romanian).
    3) Apply a CSS Class to each section that will be used to hide it for a particular language. For my English section, I have a class “hide-ro” and for my Romanian section, I have a class “hide-en”
    4) Go into Custom CSS portion of Divi and add the following styles (change the lang attribute to your language and the hide class to be what you use in Divi settings for row/section/module.

    html[lang="ro-RO"] .hide-ro {
    	display: none;
    }
    
    html[lang="en-US"] .hide-en {
    	display: none;
    }

    Again, not ideal situation as ideally, it is simply two sections/rows/modules that Polylang can have two contexts for just like pages and posts but I believe this is the simplest solution and without too much of a headache to manage. I recommend using the classes responsibly by using these on the highest level node possible (section vs row, row versus module, etc) to make your life easier.

    Let me know if this worked or has any unintended consequences. I think SEO will have some impact but shouldn’t be too bad for the Footer for me.

    Thanks storytimesolutions.

    That worked well for me, quick, nice and easy.

    witkinss

    (@witkinss)

    I used storytimesolutions’ alternative (which did not worked for me) but used the css lang selector, which did worked (In my case, languages where NL and NL:

    :lang(en).hide-nl {
    display: none;
    }

    :lang(nl).hide-en {
    display: none;
    }

    I still have a doubt about what will show if browser detects a different language other than EN or NL in my case. Loved this alternative as it is pretty simple and clean.

    • This reply was modified 1 year ago by witkinss.
    storytimesolutions

    (@storytimesolutions)

    @witkinss That is an interesting solution and I am stunned that the :lang CSS selector is supported by so many browsers including IE8 🙂 (https://developer.mozilla.org/en-US/docs/Web/CSS/:lang). That could be the best alternative as my includes locale which could make it harder; however, mine I believe is driven by the language of the URL within Polylang where your’s is dependent on the browser’s interpretation of correct language for the page.

    Hi @storytimesolutions It worked for me! Thanks.

    NOTE : Don’t forget to include the sub code. The first time I was trying to point with html[lang=”en-US”] instead html[lang=”en-GB”] my selected language.
    Also (just in case) is not working with “PERSONALIZE” view (live preview), you must refresh the page to see that working.

    @storytimesolutions BRILLIANT! Just BRILLIANT! Thank you!

    DIVI, POLYLANG, headers, footers
    I find a way to use same header, with minimal modifications.
    At elegant themes they say to use WPML…
    I used polylang free version .
    Installed 4 languages.
    Installed plugin Folders by Premio.
    make folder for every 4 pages languages, again same whit post.
    Put pages version of languages in different folders.. US, ES, CH , FR,
    Go to them builder…
    Create new template.
    Choose header for pages in folder ES, US, CH, FR, etc,, as you have put pages in that folder previously…
    apply template ONLY for that pages..
    add header, footer,,, etc…
    Again with post,
    again with forms
    etc…
    works perfect
    I’m lucky i don’t know almost nothing about PHP or CSS.
    5 days thinking ha,ha,ha, but i will learn now.

    I used the method suggested by @benceszemerey and it kind of works. The problem is that once you save your translated module the editor is no longer able to show the wireframe view – it shows instead a 404 page inside a frame. Therefore, you cannot modify a translation module anymore.

    This would depend on how your languages are set up. Are you using a plugin to convert the language or are you using subdomains EG: with this you can have either *versysmedia.com/en* or *versysmedia.com/fr*

    You can either set global footers for each of the subdomains or if all the pages are on the same domain under different pages you can set a footer for each of the pages that require it (See Below Screenshot of our company website)

    https://ibb.co/MZKmWzK

    This is the DIVI Theme Builder and can be found through this link – https://yourdomain.com/wp-admin/admin.php?page=et_theme_builder

    Otherwise you could try a language converter plugin that changes everything I think Google actually offers one of these as a plugin. Just note that Google will translate passages literally and may miss out on any slang or cultural terms

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.