Your culture could be represented as en-Us
. Debug your code first. That might be the problem.
CultureInfo
is a class, so it is a reference type. When you compare two different reference with ==
, it always return false
. You can try to compare them based their CultureInfo.Name
property for example. Like;
if(currentCulture.Name == culture.Name)
{
msg = "Some words";
}