Archive for February 11th, 2010

Localizing Strings with an Extension Method

February 11 2010 No comments yet

This is rather uncommon situation, but we needed a way to easily translate strings in our code against the resources deployed in 12\Resources. We created extension methods for that:

public static string Localize(this string source)
{
    return Localize(source, (uint) Thread.CurrentThread.CurrentCulture.LCID);
}

Read more »