I'm sorry if this is a stupid question but if I want to return column depending on culture, what would the best way be?
I've thought of having if elses in the linq select statement
or making an extension: Say I use code first with linq and have a class Country with an empty Name and Name_fr, Name_no, Name_** etc.
public static IEnumerable<Country> C(this IEnumerable<Country> Countries)
{
if (Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == "en")
{
return Countries.Select(x => new Country { x.Name = x.Name_en });
}
}
Is there a standard way of more than string data from resx based on culture? I'm sorry if this is a duplicate, but I couldn't find the answer.
Cheers, Hawk