Honesly speaking, if I understand correctly what happens under the hood, asp.net core engine on the server is supposed to return appropriately changed html to the browser, so it should be totally browser-irrelevent. The weirdest thing about it is that it happens only on some browsers (unfortunately, on the ones that are most frequently used :)). If you set a cookie but doesn't have the correct culture returned by ASP.NET Core culture providers, then it is another issue that should be diagnosed on its own. You are using ASP.NET Core culture providers ? So it seems there are only problems on Chrome/IE. Published in Opera and Safari, and changing culture works well on both. I suppose you rebuilt my project and tested the rebuilt site, right? Otherwise, if you tested the page I published and got different result, that would meant it must be something with the particular browser version I'm using. Instead of using onclick attribute for your submit button, for your Below is the handler that's supposed to be called:Įventhough in theory, your code should work, Chrome thinks otherwise, as noted in thisĬhrome groups discussion (may be a bug, may be the intended design). I just found another in-chrome bug: contact me form doesn't work in chrome, wheareas it does work perfectly well in Firefox & IE. Here's a github repository for the project. Return Redirect(returnUrl + "?culture=" + culture) Return Redirect(url + "?culture=" + culture) Var url = returnUrl.Substring(0, returnUrl.IndexOf("?culture=")) ("Culture", "c=" + culture + "|uic=" + culture, Here's the method that's creating the cookie: public async Task OnGetSetCultureAsync(string culture) I checked and in all browser the cookie IS created and it contains correct value etc., but only in Firefox it effects in changing the culture. Having published my page I discovered that his functionality doesn't work in Chrome and IE (haven't At least I thought so as I checked this only in Firefox browser. This thread I've managed to get my page changing culture based on the cookie the user has set.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |