Title: JavaScript function for dynamic content translation
Last modified: August 15, 2025

---

# JavaScript function for dynamic content translation

 *  Resolved [hgeorge89](https://wordpress.org/support/users/hgeorge89/)
 * (@hgeorge89)
 * [9 months, 1 week ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/)
 * Hi All, is there a global JavaScript function I can call to make your plugin 
   re-translate dynamic content that is loaded into the page via AJAX or in an iframe?
   For example, something like etm.translatePage(). Thank you.

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

 *  Plugin Author [EC WEB-T](https://wordpress.org/support/users/ecwebt/)
 * (@ecwebt)
 * [9 months, 1 week ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18603521)
 * Hello,
 * Unfortunately, the plugin does not offer a global JavaScript function. However,
   it automatically translates dynamic content by default.
 *  Thread Starter [hgeorge89](https://wordpress.org/support/users/hgeorge89/)
 * (@hgeorge89)
 * [9 months ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18609280)
 * Thank you for your reply. By default I think so too, but for some reason this
   is not the case with The Events Calendar. Do you have any experience with this
   plugin or anyone else? Thanks in advance!
 *  [peterteszary](https://wordpress.org/support/users/peterteszary/)
 * (@peterteszary)
 * [9 months ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18609480)
 * Hello Support Team,
   We are experiencing a critical language synchronization issue
   on our website, which uses both the WEB-T multilingual plugin and The Events 
   Calendar.Environment:Multilingual Plugin: WEB-TEvents Plugin: The Events CalendarTheme/
   Builder: Bricks BuilderScreenshots:[https://share.zight.com/ApudzBrB](https://share.zight.com/ApudzBrB)
   [https://share.zight.com/rRuRjyL2](https://share.zight.com/rRuRjyL2)Problem Description:
   Our setup involves a main page managed by WEB-T (using URL slugs like /en/ and/
   de/ for language) and an embedded calendar from The Events Calendar, which is
   displayed in an iframe. The language of the parent page and the iframe content
   are not synchronized.The issue is two-fold, as demonstrated in the attached screenshots:**
   Scenario 1:The parent page URL is correctly set to /en/, and the main language
   switcher in the site header shows “English”.However, the embedded The Events 
   Calendar iframe completely ignores the parent page’s language. It loads in the
   default language (Hungarian), and its own internal language switcher shows “Hungarian”.
   Scenario 2:This demonstrates a deeper problem. Even when we manually change the
   language switcher inside the iframe to “English”……the actual calendar content(
   the month name “augusztus”, day names “HET”, “KED”, etc.) remains untranslated
   in Hungarian.This indicates that the embedded view is failing to load the correct.
   mo language file for English, even when explicitly instructed to do so by its
   own switcher.What we have tried:We have attempted several solutions, including
   server-side PHP snippets to force the WordPress locale based on the parent URL,
   and client-side JavaScript to dynamically change the iframe’s src URL to include
   a language code. None of these have resolved the core issue of the iframe’s inability
   to load the correct language files.Our Questions:For WEB-T Support: How can the
   language selected on the parent page be programmatically passed to an embedded
   iframe on the same domain? Does your plugin offer a specific URL structure, query
   parameter, or JavaScript event that we can use to enforce language synchronization
   with iframes?For The Events Calendar Support: Why does the embedded calendar 
   view (/calendar-embed/…) fail to load its translation files (.mo files) even 
   when its internal language switcher is set to a different language? Is this a
   known issue, and is there a required parameter or method to correctly initialize
   the embedded view with a specific language?This issue is critical for our multilingual
   user experience. Any guidance you can provide would be greatly appreciated.Thank
   you for your time and assistance.Best regards,Peter
 *  Plugin Author [EC WEB-T](https://wordpress.org/support/users/ecwebt/)
 * (@ecwebt)
 * [9 months ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18612162)
 * Hello [@hgeorge89](https://wordpress.org/support/users/hgeorge89/) and [@peterteszary](https://wordpress.org/support/users/peterteszary/),
 * Thank you for reaching out!
 * We conducted some tests and found that the WEB-T plugin successfully translates
   most of the content on the “The event calendar” page:
   [http://www.your-domain.com/events/](http://www.your-domain.com/events/)
   When a different language is selected, the plugin translates all visible text
   on the page. However, the abbreviated day names (e.g., MON, TUE) remain unchanged
   because the translation server doesn’t recognize them as translatable words. 
   The same limitation applies to abbreviated month names (e.g., JAN, FEB).
 * To address this, you can manually translate these abbreviations using the **“
   Translate Page”** option available at the top of the page.
 * As for the iframe, Web-T is unable to translate its content because an iframe
   essentially loads a separate website within your page. Since the plugin only 
   processes text directly embedded in your site, anything inside the iframe falls
   outside its scope.
 *  [peterteszary](https://wordpress.org/support/users/peterteszary/)
 * (@peterteszary)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18624284)
 * [@ecwebt](https://wordpress.org/support/users/ecwebt/) ,
 * I am experiencing a persistent issue where I am unable to override a template
   file to customize the month view. My goal is to display the full names of the
   weekdays instead of the default abbreviations. After extensive debugging, it 
   appears the template override is being ignored, and the setting to switch between
   view versions (v1/v2) is missing.
 * **My Environment:**
    - **The Events Calendar Version:** `[Your Events Calendar Version]`
    - **WordPress Version:** `[Your WordPress Version]`
    - **Theme:** Bricks Builder with a child theme.
    - **Language:** Hungarian (`hu_HU`)
 * ## Problem Description
 * My goal is to display the full weekday names (e.g., “Hétfő” instead of “HET”)
   in the calendar’s month view header.
 * **1. Attempted v2 Template Override (Failed)**
 * Following your documentation, I created a template override file in my child 
   theme at this location: `wp-content/themes/my-child-theme/tribe/events/v2/month/
   calendar-header.php`
 * Inside this file, I modified the code to echo the full day name (`<?php echo 
   esc_html( $day ); ?>`). However, this change had no effect on the front end.
 * **2. Proving the Override File is Not Loading**
 * To confirm that the file was being ignored, I added a simple `<h1>TEST</h1>` 
   tag to the top of my overridden `calendar-header.php` file. After clearing all
   caches (plugin, server, and browser), the “TEST” text **did not appear**. This
   proves that the WordPress template hierarchy is not loading my override file 
   for some reason.
 * **3. Investigating the View Version (v1 vs. v2)**
 * The only logical conclusion was that my site is not using the “Updated (v2)” 
   views, but is instead stuck on the “Legacy (v1)” views, thus ignoring the `/v2/`
   directory.
 * However, the setting to switch between “Legacy (v1)” and “Updated (v2)” views
   is completely missing from my settings pages. I have checked thoroughly under**
   Events → Settings → Display** and **Events → Settings → General**, and the option
   is not present in either location.
 * **4. Temporary Workaround**
 * As a temporary fix, I am now using a JavaScript snippet to forcibly rewrite the
   weekday names in the user’s browser after the page loads. This works, but it’s
   not an ideal solution as it can cause a “flash” of incorrect content and is dependent
   on the theme’s HTML structure.## My Questions
    1. Why is my template override at `.../tribe/events/v2/month/calendar-header.php`
       being completely ignored by the plugin?
    2. Why is the setting to switch between “Legacy (v1)” and “Updated (v2)” views 
       missing from my admin panel?
    3. Is there a constant (e.g., in `wp-config.php`) or a filter that could be forcing
       my site into Legacy mode and hiding this setting?
    4. Given this situation, what is the correct, recommended method to customize the
       month view header to show full weekday names?
 * Thank you for your time and assistance in resolving this issue.
 * Best regards, Péter
 *  Plugin Author [EC WEB-T](https://wordpress.org/support/users/ecwebt/)
 * (@ecwebt)
 * [8 months, 3 weeks ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18625500)
 * Hello [@peterteszary](https://wordpress.org/support/users/peterteszary/)
 * The issue appears to be related to either _The Events Calendar_ plugin or WordPress
   itself. Unfortunately, there’s not much we can do to assist from the WEB-T side.
 * We remain at your disposal should you need anything else regarding the WEB-T 
   plugin.
 * Best regards,
 * WEB-T Team

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

The topic ‘JavaScript function for dynamic content translation’ is closed to new
replies.

 * ![](https://ps.w.org/etranslation-multilingual/assets/icon.svg?rev=3023895)
 * [WEB-T – eTranslation Multilingual](https://wordpress.org/plugins/etranslation-multilingual/)
 * [Support Threads](https://wordpress.org/support/plugin/etranslation-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/etranslation-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/etranslation-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/etranslation-multilingual/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [EC WEB-T](https://wordpress.org/support/users/ecwebt/)
 * Last activity: [8 months, 3 weeks ago](https://wordpress.org/support/topic/javascript-function-for-dynamic-content-translation/#post-18625500)
 * Status: resolved