DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Make Language choice persistant?

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





Veteran Member





    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..






    Veteran Member





      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.








        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.

          

         

         

         

         






        Veteran Member





          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.





          Veteran Member





            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.

             

             






            Veteran Member





              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.

              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).

               

               









                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.

                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. 

                 

                 

                 






                Veteran Member





                  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.






                  Veteran Member





                    To give my two cents: I don't know many users (and I am talking of users, not tech people, you know, the ones that ask what is the difference between Word and Excel, or who say that they destroyed the internet with their laptop...) who know where to set language preferences in the browser. Either they are set as a Group Policy in a domain network, or they are never touched. Therefore, I agree with Timo and Peter.

                    Happy DNNing!
                    Michael

                    Michael Tobisch
                    DNN★MVP

                    dnnWerk Austria
                    DNN Connect





                    Veteran Member





                      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.

                      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.

                      Yes, I agree, it's not simple and needs a lot of testing..

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      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:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved