How to enable resx at runtime?

I have a second resx file Strings.ps-ps.resx that I want to point to my code at runtime. Each resx has Designer.cs with a unique class name. Should I switch / wrap these things myself? ... or is there some kind of built-in approach?

+1
source share
1 answer

You need to change your interface culture to use a different resx file. This can be done in config

<globalization uiCulture="es" culture="es-MX" />

or in code

Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");;

If you want to automatically adapt to the user, you can request HttpContext.Current.Request.UserLanguagesfor user browser settings

+2
source

All Articles