Help Center Advanced
Dynamic Content Translation: Real-Time Refresh Rates
Dynamic Content Translation: Real-Time Refresh Rates
Last updated: 2 months ago
2 minute read
Steven Wise
CEO at SiteTran


Dynamic Content Translation: Real-Time Refresh Rates

By default, SiteTran continuously monitors your page to identify and translate new content that you might be adding to the page dynamically with JavaScript like:

  • Popups.
  • Modal Dialogs.
  • Tooltips.
  • Wizards.
  • Interactive or Dynamic Forms.
  • Dropdown Menus.

If you don't have any dynamic content, then this doesn't happen, but if you have dynamic content then your phrases may not be on the page and available for the SiteTran Widget to translate on the page load. That's why when SiteTran notices that a dynamic change happened on page, we refresh the active translations on that page. We don't refresh the translations on the page if nothing was changed. You can optionally set your own maximum refresh frequency explained here:

By default sitetran.refresh_translation_seconds is set to 0.5 which is half a second. Which means the SiteTran Widget tries to refresh the translations (if needed) for untranslated phrases on the page a maximum of every 0.5 seconds. If your site frequently updates content dynamically, adjusting this frequency will change how quickly or slowly new elements are translated. To customize the translation refresh rate, simply add the following line to your SiteTran widget initialization:

sitetran.refresh_translation_seconds = 0.5;
Note: If you notice that translations are loading slowly for your dynamic content, you may want to raise the frequency at which translations are refreshed. And if you have a huge page with lot of content including a lot of dynamic content, you may need to lower the value on that page.
Couldn't find what you were looking for?

In this article

Website Translation Made Easy