Getting resource value with explicit localization

Assuming you have multiple resource files:

Messages.resx
Messages.fr-FR.resx
...
Messages.xx-XX.resx

all containing some string value you could retrieve the value for a specific culture:

var culture = new CultureInfo("fr-FR");
string value = Messages.ResourceManager.GetString("SomeKey", culture);

and this will be independently of the value of the current thread culture.


Better practice is to use nameof to mantain intellisense and avoid typing errors

var culture = new CultureInfo("fr-FR");
string value = Messages.ResourceManager.GetString(nameof(Messages.SomeKey), culture);