Title: Dynamic Inline HTML Inserts
Last modified: September 13, 2026

---

# Dynamic Inline HTML Inserts

 *  Resolved [jcocking](https://wordpress.org/support/users/jcocking/)
 * (@jcocking)
 * [6 days, 1 hour ago](https://wordpress.org/support/topic/dynamic-inline-html-inserts/)
 * My WordPress site is the front end of a forum. We have have numerous inline html
   snippets used throughout the website. The inline html is updated every hour. 
   The challenge is the translations is not catching the updates. 
   I use the following
   block to insert the dynamic text: [inline_html file=”my-filename.php”]Sample 
   page: [https://lotuselan.net/lotus-elan-series-2/](https://lotuselan.net/lotus-elan-series-2/)
   Look at the Current Discussions in the right sidebar. When you switch between
   English and French: the French version was cached when the AI translation occurred.
   The English version is showing in real time.Is there a way to flag a dynamic 
   insert not to be cached?Is there a way to flag a different inline html file based
   on desired language? i.e. if lang=ja file=myfile_ja Is there a way to flag a 
   dynamic insert to be retranslated on a shorter cache duration than 14 days?Thank
   you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdynamic-inline-html-inserts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Gerard Kanters](https://wordpress.org/support/users/gkanters/)
 * (@gkanters)
 * [5 days, 18 hours ago](https://wordpress.org/support/topic/dynamic-inline-html-inserts/#post-19018782)
 * Hi,
 * Thanks for the clear example — that behaviour is expected with how AI Translate
   works.
 * English is the source language of the site. That version is not served from the
   translation cache, so WordPress runs `[inline_html]` on every request and you
   see the hourly update immediately.
 * French (and any other translated language) is a full-page snapshot: the complete
   HTML, including the sidebar. That snapshot is reused until the cache expires (
   14 days by default) or the WordPress page itself is updated. Updating a PHP file
   on disk does not change the WordPress page, so the French sidebar stays frozen
   at the moment it was translated.
 * There is no way to flag a single insert as “don’t cache”, “use another file per
   language”, or “shorter cache than 14 days”. The plugin caches whole pages, not
   fragments. A per-block exception would be a custom integration for one shortcode,
   and skipping cache for the whole page would retranslate the entire page on every
   visit — slow and expensive.
 * The practical approach is to load that dynamic block after the page, for example
   with JavaScript/AJAX, instead of inserting it into the page HTML. Then it stays
   live in every language and is not part of the translation cache. Language-specific
   files (`myfile_ja.php`, etc.) would also belong in that loader / your shortcode,
   not in AI Translate.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdynamic-inline-html-inserts%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/ai-translate/assets/icon-256x256.png?rev=3303182)
 * [AI Translate: Affordable Context-Aware Translation](https://wordpress.org/plugins/ai-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-translate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gerard Kanters](https://wordpress.org/support/users/gkanters/)
 * Last activity: [5 days, 18 hours ago](https://wordpress.org/support/topic/dynamic-inline-html-inserts/#post-19018782)
 * Status: resolved