AFAIK the cookie to store a users language choice is a Session cookie. Wouldn't it be much more logical to make this a persistant cookie? Why would a user select French today and not want French the next day (as the default)? This is mostly only an issue if the default language you want for the site is not your browser language..
Posted By Sebastian Leupold on 07 Jul 2020 05:34 AM Sorry, Timo, but this is not the best idea, IMO. Without the cookie, DNN selects the language, which best matches preferences from the browser (and if none, falls back to site default language). If the user logs in, the language is read from his profile (which is by default the selected language during registration). If DNN would store last language persistently, you would start with the last language being used before closing the browser window, even if it was just to check a single page in a different language.
If a user changes the current language to another language, (s)he does so conciously .i.e. this is not a something that happens by accident. Setting a persistent cookie in such a situation seems reasonable me. If (s)he change it to another language the cookie should be changed.
In this case the user is always in charge, and next time (s)he opens the site, DNN can rely on a consious choice instead of "guessing" the best language based on one of more imprecise parameter.
Posted By Sebastian Leupold on 07 Jul 2020 09:32 AM there are reasons to switch language temporarily, e.g. if a desired page has not (yet) been translated. If we persist the cookie, what would be the use of language preference in user profile for? This would create inconsistent behaviour, depending whether the cookie is still valid or timed out.
I'm talking about the situation for anonymous users, not once there's a language preference in the profile as that's cross device / browser. In practice in the current situation if you visit an ML site that does not match your browser language, you need to select the appropriate language every time you visit that site. I experienced it myself and it's pretty annoying TBH.
TBH I think it's inconsistent that the language is not a "stored" choice if you are anonymous, but it is when you are a registered user... (from a UX perspective).
Sebastian, how should I put it? You might try to be a bit more cooperative instead of throwing edge case arguments ...
Yes, in case of a website with members, you are right the language setting in the user profile should be leading (if it is clear to the user where (s)he can change it), but in cases where there are no members, the selection (i.e. concious choice) of a visitor is IMO far better than some imprecise default setting.
if the browser language match for anonymous users doesn't work, it sounds like either there is an issue with this feature or the user did not configure language preference correctly. Given the fact, that most users might be in the same situation, a persistent cookie (with short duration) might be an improvement. However - AFAIR Alanguage detection is not a trivial part of the platform code, i.e. should be modified very carefully and tested intensively.
Posted By Sebastian Leupold on 08 Jul 2020 03:25 AM if the browser language match for anonymous users doesn't work, it sounds like either there is an issue with this feature or the user did not configure language preference correctly.
if the browser language match for anonymous users doesn't work, it sounds like either there is an issue with this feature or the user did not configure language preference correctly.
It does work, but the "uses case" is that the user selects a different language than the browser language and has to re-select it on every visit.
Posted By Sebastian Leupold on 08 Jul 2020 03:25 AM Given the fact, that most users might be in the same situation, a persistent cookie (with short duration) might be an improvement. However - AFAIR Alanguage detection is not a trivial part of the platform code, i.e. should be modified very carefully and tested intensively.
Given the fact, that most users might be in the same situation, a persistent cookie (with short duration) might be an improvement. However - AFAIR Alanguage detection is not a trivial part of the platform code, i.e. should be modified very carefully and tested intensively.
Yes, I agree, it's not simple and needs a lot of testing..
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.