Bug Description
When the SureFeedback host site is set to a language (e.g. French), the popup always appears in that language on all client sites, even when the client site is set to a different language (e.g. English).
Root Cause
The script() method in ph-child.php builds the embed script URL without passing the client page's locale to the host. The host therefore always falls back to its own get_locale() when deciding which translation file to load.
Fix
Add ph_locale to the script URL using document.documentElement.lang, which is set correctly by WordPress, WPML, Polylang and other multilingual plugins.
Companion issue
The host-side fix is tracked in brainstormforce/project-huddle#674.
Bug Description
When the SureFeedback host site is set to a language (e.g. French), the popup always appears in that language on all client sites, even when the client site is set to a different language (e.g. English).
Root Cause
The
script()method inph-child.phpbuilds the embed script URL without passing the client page's locale to the host. The host therefore always falls back to its ownget_locale()when deciding which translation file to load.Fix
Add
ph_localeto the script URL usingdocument.documentElement.lang, which is set correctly by WordPress, WPML, Polylang and other multilingual plugins.Companion issue
The host-side fix is tracked in brainstormforce/project-huddle#674.