Skip to content

Vue component should emit an event when the language is changed #855

Description

@garethbowen

Description

The forms app attempts to pick the right language but it's limited because, a) it doesn't know anything about the languages configured in the xform, and b) it doesn't know when the user manually picks a language using the components language selector. This means the language of the app and component may get out of sync, particularly for first load, when the user hasn't set the locale in local storage yet.

Extend the API with an event that fires when the locale is set, both when the web-forms i18n code updates it, and when the user picks a language from the dropdown. Update the forms app to listen to this event and update its locale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions