Title: Two languages
Last modified: August 31, 2016

---

# Two languages

 *  Resolved [victoireloup](https://wordpress.org/support/users/victoireloup/)
 * (@victoireloup)
 * [10 years ago](https://wordpress.org/support/topic/two-languages-3/)
 * Hello!
    I love boxzilla and I am using a website in two languages: intheloup.
   net Is there a way to have two different boxes depending on the language people
   see? Thank you so much, Victoire
 * [https://wordpress.org/plugins/boxzilla/](https://wordpress.org/plugins/boxzilla/)

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

 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [10 years ago](https://wordpress.org/support/topic/two-languages-3/#post-7442716)
 * Hi Victoire,
 * Yes, this is definitely possible but will require a few lines of code. Are you
   using WPML? In that case, the following example code should do what you want.
 * **In box settings**:
 *  Load this box if … everywhere
 * **In your theme its functions.php file**:
 *     ```
       // load box "100" when viewing English site
       add_filter( 'boxzilla_load_box_100', function() {
           return ICL_LANGUAGE_CODE == 'en';
       });
   
       // load box "105" when viewing German site
       add_filter( 'boxzilla_load_box_105', function() {
           return ICL_LANGUAGE_CODE == 'de';
       });
       ```
   
 * Hope that helps. If not, let me know!
 *  Thread Starter [victoireloup](https://wordpress.org/support/users/victoireloup/)
 * (@victoireloup)
 * [10 years ago](https://wordpress.org/support/topic/two-languages-3/#post-7442723)
 * Hello Danny! Thank you so much for your help. I’m actually using Polylang, would
   you have something for that?
    My two languages are English and French.
 * Merci!!
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [10 years ago](https://wordpress.org/support/topic/two-languages-3/#post-7442762)
 * Hi Victoire,
 * With Polylang, the following should work!
 *     ```
       // load box "100" when viewing English site
       add_filter( 'boxzilla_load_box_100', function() {
           return pll_current_language() == 'en';
       });
   
       // repeat for other languages and box ID's.
       ```
   
 * PS. Should you have a quick minute to spare, a [plugin review here on WordPress.org](http://wordpress.org/support/view/plugin-reviews/boxzilla)
   would make us quite happy. 🙂
 *  Thread Starter [victoireloup](https://wordpress.org/support/users/victoireloup/)
 * (@victoireloup)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8466542)
 * Hey Danny, I added that to the custom CSS section but it’s still not working,
   could you let me know how to proceed? Thank you a million times!
 *  Thread Starter [victoireloup](https://wordpress.org/support/users/victoireloup/)
 * (@victoireloup)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8466832)
 * I get a lot of error messages when I’m adding this to my custom CSS, would you
   like access to my back office? Thank you!!
    -  This reply was modified 9 years, 6 months ago by [victoireloup](https://wordpress.org/support/users/victoireloup/).
      Reason: more details
 *  [Aircut](https://wordpress.org/support/users/aircut/)
 * (@aircut)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8500297)
 * [@dvankooten](https://wordpress.org/support/users/dvankooten/)
    This thread is
   also relevant to me….
 * what are the numbers 100 and 105 represent in the code ?
 *     ```
       // load box "100" when viewing English site
       add_filter( 'boxzilla_load_box_100', function() {
           return ICL_LANGUAGE_CODE == 'en';
       });
   
       // load box "105" when viewing German site
       add_filter( 'boxzilla_load_box_105', function() {
           return ICL_LANGUAGE_CODE == 'de';
       });
       ```
   
 * can i use this function as it is with only adjusting the ICL_LANGUAGE_CODE to
   all the boxes defined ?
 *  [Aircut](https://wordpress.org/support/users/aircut/)
 * (@aircut)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8500417)
 * [@dvankooten](https://wordpress.org/support/users/dvankooten/)
 * never mind… i figured it myself…. it’s the Box ID
 * works smoothly
 * thanks!
 *  [Mohamed Hamad](https://wordpress.org/support/users/mohamedhamad/)
 * (@mohamedhamad)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8690289)
 * is there a way to do this for every box with out having to use the ID.
    I’d like
   it to apply to each box we create coz my site is completely bilingual

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

The topic ‘Two languages’ is closed to new replies.

 * ![](https://ps.w.org/boxzilla/assets/icon-256x256.png?rev=1414640)
 * [Boxzilla - WordPress Popup Builder](https://wordpress.org/plugins/boxzilla/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/boxzilla/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/boxzilla/)
 * [Active Topics](https://wordpress.org/support/plugin/boxzilla/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/boxzilla/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/boxzilla/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [Mohamed Hamad](https://wordpress.org/support/users/mohamedhamad/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/two-languages-3/#post-8690289)
 * Status: resolved