Skip to content

Popup language always uses host site locale instead of client page language #89

@dhruvlmao

Description

@dhruvlmao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions