<p>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. </p>

<p>How can i get the code underneath working? Any ideas? Maybe better options?    </p>

<pre><code>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);
}
</code></pre>

have you tried something where you
yield
the item?
```
```
public static IEnumerable<string> Localize(this IEnumerable<string> items, CultureInfo culture)
{
    foreach (string item in items)
    {
        yield return ResourceHelper.GetString(item,culture);
    }
}
```
```
this won't change any other the items in the collection you are enumerating over, but it will return what you want it to.