I have a question and a problem.
First off, I am trying to separate the login screen language and the application language — so that when a user logs out in German, the login screen is in English (or vice versa) and when he logs in, it doesn't revert the application language to English for the aforementioned user.
Seems rather simple, but I can't understand why cookies are responsible for changing the language. In the language-switch
component, there is this code in topbar
component:
this._customSettingsService.changeLanguage(languageName)
.subscribe(() => {
abp.utils.setCookieValue(
"Abp.Localization.CultureName",
languageName,
new Date(new Date().getTime() + 5 * 365 * 86400000), // 5 years
abp.appPath
);
window.location.reload();
});
When I comment out the abp.utils.setCookieValue
, the language does not switch, which does not make any sense whatsoever.
Important note: I changed the ngOnInit()
function in app.component
, so that current and user languages are read from the DB dbo.AbpSettings
and are changed accordingly.
Any clarification would be very helpful.