Base solution for your next web application
Open Closed

Angular setting language cookie not working on linux container image setup #12254


User avatar
0
pliaspzero created

Hi,

we use V13.4

In production on windows based systems - language chnage by clicking on flag is working.

I've now installation on linux based container image - whenever I click on flag to change language - it jumps back to american english. Any idea how to fix?

Second - we use an SSO login logic - where we can get from database the language setting of the user - can we chnage it from API on the fly when usr logs in?


1 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @pliaspzero,

    Could you share your app logs on Linux? For the second question, aspnetzero already has this feature. https://aspnetboilerplate.com/Pages/Documents/Localization#how-the-current-language-is-determined

    Startup.cs

    app.UseAbp(options =>
    {
        options.UseAbpRequestLocalization = false; //used below: UseAbpRequestLocalization
    });
    
    using (var scope = app.ApplicationServices.CreateScope())
    {
        if (scope.ServiceProvider.GetService<DatabaseCheckHelper>()
            .Exist(_appConfiguration["ConnectionStrings:Default"]))
        {
            app.UseAbpRequestLocalization();
        }
    }