Open Closed

Switching Language on Login Page does not work in GKE #7961


0
kit8404 created

We are running the asp.net Zero v7.1 (angular, .net core) in a Google Kubernetes cluster (GKE). We now have the problem of the login page not switching languages: e.g. the user switches on the login page from English to German: the page remains in English. Language switching works, once the user is logged in.

We have this issue only in GKE. The functionality works on our development machines locally. Any ideas?

Thomas


7 Answer(s)
  • 0
    maliming created
    Support Team

    When you switch languages on the login page, can you check your browser's cookies?

    eg:

    > document.cookie
    < "Abp.Localization.CultureName=de"
    
  • 0
    kit8404 created

    Thank you for the switft reply. The cookie is present and changes when one switches the language.

  • 0
    maliming created
    Support Team

    If this problem does not exist in other environments, such as your production server, azure, docker, then the problem should be caused by Google Kubernetes cluster, I don't know about it, maybe you can ask Google Kubernetes cluster?

  • 0
    piapps created

    I am having a similar problem in Azure, my local works fine, but on the production server the language switch is not being obeyed. Doesnt matter what I click it will not change language, the request header looks correct and when a cookie does appear (i have deleted them a few times to see if it helps) it also looks correct.

    The application is still sending different text back though, i even disabled all but two languages and changed the culture code on the 2nd language (that was always being selected) to something else so it would hopefully pick the default of the tenant, it however still picks the wrong language.

    Checking the db table settings gives me various results and im not sure what is actually supposed to be in there, whenever I pick the language of the default tenant I am getting no record in there. Other times there is a null value in there, niether seems correct to my eyes but that doesnt mean its wrong if it was basing on the tenant default then that would be acceptable. I am starting to think maybe the culture header is being stripped from my requests and thus being ignored but I can not find any documentation to support that claim by Azure.

    Anyone got any ideas?

  • 0
    maliming created
    Support Team

    hi piapp

    Can you share the url of your application(on azure) to me? liming.ma@volosoft.com

  • 1
    piapps created

    I think I have it resolved but am just getting it retested by client at moment, i had set everything to default to English (Australia) which is required, but it wouldnt select the language no matter what we did. However I read somewhere else (cant remember where) that someone had to create a en-AU.xml file and thats what i have done and it does seem to work now.

    I am not 100% sure why that helps but i will keep you posted if it fixed the issue or not

  • 0
    payoff created

    I know this is 2 years old, but am having the same issue (AspNetZero 9.3 NetCore + Angular)

    Switching the language on the login page does not work.

    The fact that the cookie is set by the client without the SameSite attribute might be correlated, see also https://github.com/aspnetzero/aspnet-zero-core/issues/3323

    language-switch-component uses the client function abp.utils.setCookieValue, which does not set any same site attributes or secure flag when in HTTPS.

    Any fix for any of this ?