Title: Translate Divi&#8217;s code module
Last modified: February 9, 2020

---

# Translate Divi’s code module

 *  Resolved [drteddy](https://wordpress.org/support/users/drteddy/)
 * (@drteddy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/translate-divis-code-module/)
 * Hi!
 * In the page mentioned I have some Divi’s code modules in which I have links to
   internal pages of the site. For the greek version the links are OK, BUT how can
   I edit the code module to add the **&lang=en** term, since TranslatePress doesn’t
   work while Divi’s page builder is activated?
 * Here is a screenshot hoping to explain further what I exactly mean
    [https://i.paste.pics/80HD3.png](https://i.paste.pics/80HD3.png)
 * Thanks in advance
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftranslate-divis-code-module%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12417795)
 * Hello,
 * I don’t know if I understood correctly what you are trying to achieve.
 * The **Force language in custom links** option from TP Settings might help you.
 * This is useful if you want to force custom links without language encoding to
   keep the currently selected language.
 * Best wishes,
 *  Thread Starter [drteddy](https://wordpress.org/support/users/drteddy/)
 * (@drteddy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12419224)
 * I’ll try to be as clear as possible. If you visit the page mentioned in my previous
   post (bulevart.gr) and scroll down you’ll see (among others) these images:
    [https://paste.pics/80UM8](https://paste.pics/80UM8)
 * If you hover to them you’ll understand that there links. Each one of them is 
   Divi’s Code Module. The link is defined through html in Code Module. I want that
   link changed according the selected language.
 * Let me know if I’ve clarified the matter now…
 * Thanks again.
 * Best Regards
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12421251)
 * Hello,
 * You can try using our [Conditional Shortcode Based on Language](https://translatepress.com/docs/translation-shortcode/).
 * Check our documentation and let me know if it works for you.
 * Best regards,
 *  Thread Starter [drteddy](https://wordpress.org/support/users/drteddy/)
 * (@drteddy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12423848)
 * I think that’s the solution but I’m really having a hard time to implement it.
 * Check out the code below:
 *     ```
       <div class="custom_overlay">
        <img src="https://bulevart.gr/wp-content/uploads/2019/10/fessas_crp.jpg" alt="Image" class="image">
            <a href="https://bulevart.gr/erga/?swoof=1&pa_dimiourgos=giorgos-fessas">
   
               <div class="overlay">
   
                   <div class="text">Γιώργος Φέσσας</div>
               </div>
           </a>
       </div>
       ```
   
 * I want the link (in the a tag) be different depending on active language. On 
   the code above is for greek language. For English I want to add the “&lang-en”
   in the end.
 * Any ideas appreciated.
 * Thanks again,
 * Best regards
    -  This reply was modified 6 years, 4 months ago by [drteddy](https://wordpress.org/support/users/drteddy/).
    -  This reply was modified 6 years, 4 months ago by [drteddy](https://wordpress.org/support/users/drteddy/).
    -  This reply was modified 6 years, 4 months ago by [drteddy](https://wordpress.org/support/users/drteddy/).
    -  This reply was modified 6 years, 4 months ago by [drteddy](https://wordpress.org/support/users/drteddy/).
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12426724)
 * Hello,
 * You could try something like this:
 *     ```
       <div class="custom_overlay">
   
         <img src="/" />
   
              [trp_language language="el_GR"]
   
               //link for Greek language
   
              [/trp_language]
   
              [trp_language language="en_US"]
   
              //link for English language
   
              [/trp_language]
   
               <div class="overlay">
                  <div class="text">Γιώργος Φέσσας</div>
               </div>
           </a>
       </div>
       ```
   
 * Let me know how this goes.
 * Best regards,
    -  This reply was modified 6 years, 3 months ago by [Dragos](https://wordpress.org/support/users/dragosvrejiu/).
    -  This reply was modified 6 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This reply was modified 6 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [drteddy](https://wordpress.org/support/users/drteddy/)
 * (@drteddy)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12428201)
 * Yes!!
 * You’re a life savior! I’ve busted my head these days.
 * Thank you very much!
 *  [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * (@dragosvrejiu)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12432231)
 * I’m glad that it’s working.
 * Best of luck with your project!
 * With the best regards,

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Translate Divi’s code module’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [TranslatePress - Translate Multilingual sites with AI Translation](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

## Tags

 * [divi](https://wordpress.org/support/topic-tag/divi/)

 * 7 replies
 * 2 participants
 * Last reply from: [Dragos](https://wordpress.org/support/users/dragosvrejiu/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/translate-divis-code-module/#post-12432231)
 * Status: resolved