Translating WP Travel Engine JavaScript Strings with WPML
Translate missing WP Travel Engine text in booking, My Account, and admin screens by scanning JavaScript strings with WPML.
Why some text stays untranslated
Some WP Travel Engine text may remain in English after you translate your site with WPML. This can happen in the booking modal, the My Account page, or WordPress admin screens.
That text comes from JavaScript. WPML can find it after you enable JavaScript string detection and scan WP Travel Engine again. You can then add the missing translations and check the translated page.
What you'll need
You need WPML 4.9.0 or later, with the WPML String Translation add-on installed and activated.
Translate the missing strings
Follow these steps from the WordPress dashboard. The dashboard menus appear in the left sidebar.
Turn on JavaScript string detection
JavaScript string detection allows WPML to find text that loads inside interactive parts of your site, such as the booking modal.
In the WordPress dashboard, open WPML in the left sidebar. Select Settings, then find the String Translation settings. Turn on Detect strings in JavaScript files.
Keep this setting on until you finish the scan. The next step finds the WP Travel Engine strings.
Scan WP Travel Engine
The scan adds the JavaScript strings to WPML so you can translate them.
Open this direct WordPress admin URL:
/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/theme-localization.php
On the page, tick WP Travel Engine and run the scan. When the scan finishes, continue to the string list.
Find the WP Travel Engine strings
The string domain filters the list to text from one plugin. In the WordPress dashboard left sidebar, open WPML, select Translations, and then select Strings.
Select the wp-travel-engine domain and click Filter. The missing JavaScript strings should now appear in the list.
Add your translations
Adding the translation under the correct language makes the text available on that translated page.
Find the string you want to translate. Click the + control under the target language flag, then enter your translation.
For example, if the booking modal shows an untranslated label such as Price Categories, add the translated label under the language your visitor uses. Save the translation when WPML displays the save control.
Turn off JavaScript string detection
Turn off the setting after the scan and translation work is complete. Leaving JavaScript string detection on slows down your site.
Return to WPML → Settings → String Translation in the WordPress dashboard and turn off Detect strings in JavaScript files.
Your translated strings remain available after you turn detection off.
Clear the cache and check the translated page
Clearing the cache makes the updated translation visible instead of showing an older saved version.
Clear your site cache, then open the page in the translated language. Check the booking modal, the My Account page, or the admin screen where the text appeared.
If the translation appears there, the setup is complete.
Troubleshooting
Use these checks if the strings do not appear or the translated text does not change.
- If you cannot find the
wp-travel-enginedomain, WPML has not scanned the plugin. Repeat the WP Travel Engine scan. - If the JavaScript strings are missing, confirm that Detect strings in JavaScript files was on during the scan. Also confirm that your WPML version is 4.9.0 or later.
- If the translation does not appear after you add it, turn JavaScript string detection off, clear your cache, and check the translated page again.
- If you cannot find the setting or the direct admin URL, contact support with the details listed at the end of this page.
These checks resolve the most common setup problems. The questions below cover expected behavior and known limitations.
FAQs
If you're still stuck or have a question we didn't cover, our support team is happy to help. Reach out at our support page and we'll get you sorted.