Sessions and the current language (localization) are implemented on the client using store.js
After loading all the components, I need to change the value of <title> to the value from json
Now I did this:
First, the current localization in the session is checked, then the language constants of the desired language are ajax via ajax , then all the span elements with the lang class are set depending on the value of the data-l-id attribute, then the necessary component scripts with the desired localization are added.
And what about the title of the page, which is indicated in the <title> ? After all, the application is one-page, but there are many pages and localizations 4.
$("title").html(valueFromJson);? After all, the title is the same html element as everything else. Just when you load the page, you already have the desired locale, and for this locale you load the date in a custom language. And after loading, you can attach it anywhere. - alexoander