What is the best way to localize a collection (IEnumerable)? From the BL I retrieve a collection of entities which still need to localized, I figured I write a method which extends the IEnumerable and returns the localized list.
How can i get the code underneath working? Any ideas? Maybe better options?
public static IEnumerable Localize(this IEnumerable items, CultureInfo cultureInfo)
{
foreach(string item in items)
{
/*Error underneath, cannot assign to item*/
item = ResourceHelper.GetString(item, cultureInfo);
}
return (items);
}