How to make language selection permanent?

I'm testing simple multi language app. Default language is en-GB. I can change it to other language but after I close and restart browser app starts with default language. is there any option to persist language to cookie or localstorage ?

I examined languagepickercomponent source:

LanguagePickerComponent.prototype.onChange = function (value) {
        var path = location.href.replace(this.value, value);
        if (!location.href.startsWith(path)) {
            location.href = path;
        }
    };

If there is no build in solution I'm planning to use normal dropdown with custom code like above and persist somewhere what selected.

At the moment the language isn't persisted in localStorage. Using a dropdown is a viable workaround.

1 Like