- Status
- Resolved
- Type
- Bug
- Resolved in
- WPML String Translation 3.5.0
- Related plugin/theme
- Dokan
Overview of the issue
Some strings in the Dokan vendor dashboard did not appear in WPML → String Translation, so you could not translate them. It affected the shipping and verification settings pages. Those pages are built in JavaScript, and WPML could not read strings from JavaScript files at the time of the report.
Workaround
The strings on these pages come from JavaScript files. WPML reads them once you let it scan JavaScript, which is off by default:
- Go to WPML → Settings and turn on Detect strings in JavaScript files.
- Open the vendor dashboard pages that hold the strings, for example /dashboard/settings/verification/. WPML only tracks the JavaScript files that your pages actually load.
- Go to WPML → Theme and plugins localization and scan Dokan.
- Translate the strings at WPML → String Translation.
- Go back to WPML → Settings and turn Detect strings in JavaScript files off again. It slows the site down while it is on, and the strings stay registered.
The strings on the shipping page come from WooCommerce, not from Dokan. Search for them in WPML → String Translation under the WooCommerce domain. Translating them there also changes the vendor dashboard.
You no longer need to edit any file inside the plugin. The older version of this page asked you to add the strings to wp-content/plugins/dokan-pro/languages/dokan.php. Do not do that: a plugin update removes the change.