setLanguage(), so Encore serves copy in the browser’s language again. Every other attribute and the current user stay as they are.
New in the web SDK release that includes language support.
Signature
Parameters
This method takes no parameters.Behavior
- When a language was set, the SDK removes it and drops its cached copy and offers and fetches its configuration again right away. The web SDK does not load offers ahead of time, so they load in the new language on the next
show(). - When no language was set, or before
configure(), the call does nothing. - It is the only call that removes the language.
reset()and logout leave it in place. - It also removes a language set through the deprecated
languageattribute. - The browser always sends its own
Accept-Language. This call only removes the override that outranks it.
Usage
Call it when the user picks “System default” in your app’s own language picker:Related
- setLanguage(): set a language override
- Localization: how Encore picks the language it serves