Unable to get localization to get to work in MVC .net8
I'm trying to implement localization using cookies, but for some reason no matter what
.AspNetCore.Culture
equals it always uses default resx file
value of cookie is c%3Dka-GE%7Cuic%3Dka-GE
or c%3Den-US%7Cuic%3Den-US
Program.cs
4 Replies
to access elements I'm using {FileName}.{ItemName} format
I'm almost posivite to don't have to url encode/decode cookie values. That might be the issue if the values are actually
c%3Dka-GE%7Cuic%3Dka-GE
instead of c=ka-GE|uic=ka-GE
To create cookie and assign value, I'm using method almost same as shown in Microsoft documentation
right now I changed value of cookie manually and refreshed the page, but it's same, also would replacing it with
$"c={culture}|uic={culture}"
be appropriate?
and well... even like that, it changes to %3D and %7C when written in cookie
this doesn't really make sense
um, setting Designer.cs
culture solves it, so was I perhaps supposed to manually read cookie and assign it?That I'm not sure about. #web might know the correct way to do it