About Service

I created the unlocalize.com project due to the annoying localized exceptions in different Microsoft environments, like .NET Framework, SQL Server, etc... Why annoying? Did you ever come across an error message in a different language that you had to find a solution for? Usually you copy the message to an Internet search engine like Google, Yahoo and Bing and so on, and then you just hope to be pointed in the right direction.

(Un)fortunately, most solutions on the Internet are written in English. What now? Of course, if there is no solution to your localized error message found on the Internet, then you could translate the message to English yourself. But that is not as easy as it seems to be. You need be as precise as possible with your translation. Sometimes you need to be a wizard to successfully translate the message back to English. Other times you simply do not understand the message as it is written in another language apart from the native one or the English equivalent.

This is where unlocalize.com comes into its own!

You can simply search for the localized error message and let the service find the exact original (unlocalized) error message. Moreover, the service shows you the top search results of the unlocalized message directly. Also, it only takes one click more to search for other solutions yourself using your favorite search engine.

.NET (incl. Core and Framework)

.NET FrameworkMicrosoft .NET Framework has been localized into many languages worldwide. The .NET Framework supports up to 25 different languages, including the original English language. This was a nice idea for end users but often become a nightmare for developers. When some "average" developer receives some "common" error message like "Διαίρεση με το μηδέν." everything is alright, if he understands Greek that is. But what can he do if he does not understand it at all?

Why is an error message localized? Why it is not in English?

At the time of the exception the Framework exception code loads the error message from its resources,based on the current thread culture. So if the current culture is set to French (and the French .NET language is installed on the machine), the message will be localized to French. The StackTrace property is localized to the current culture as well. The following example shows how to get an exception message in French (1):


    CultureInfo oldCI = Thread.CurrentThread.CurrentCulture;
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
    try
    {
        System.IO.StreamReader sr = new System.IO.StreamReader("c:\does-not-exist");
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.ToString())
    }
    Thread.CurrentThread.CurrentCulture = oldCI;
    Thread.CurrentThread.CurrentUICulture = oldCI;

How to get the original English error message?

Unfortunately, as described above, it is not possible to get the original message once the exception is thrown. The error message cannot be returned back to English even if the current culture is changed to English. The StackTrace property is localized at the moment of accession so if the current culture is changed to English then the StackTrace will be in English too. A very nice example on how to get the StackTrace in English follows:


    try
    {
        System.IO.StreamReader sr = new System.IO.StreamReader("c:\does-not-exist");
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.ToString()); // ex contains localized StackTrace
        ExceptionLogger el = new ExceptionLogger(ex);
        System.Threading.Thread t = new System.Threading.Thread(el.DoLog);
        t.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
        t.Start();
    }

Where the ExceptionLogger class looks something like:


    class ExceptionLogger
    {
        Exception _ex;
        public ExceptionLogger(Exception ex)
        {
            _ex = ex;
        }
        public void DoLog()
        {
            Console.WriteLine(_ex.ToString()); // ex contains en-US StackTrace
        }
    }

The example above has been published by the mdb user at stackoverflow.

(1) The French language for .NET framework must be installed on the machine to get the French exception message.

Sources:
http://msdn.microsoft.com/en-us/library/aa480240.aspx
http://stackoverflow.com/questions/209133/c-sharp-exception-messages-in-english

Windows

MS WindowsMicrosoft Windows has been localized into many languages worldwide. Some of the Windows versions were introduced with the Multilingual User Interface Technology (MUI). Microsoft first introduced the Multilingual User Interface Technology for Windows 2000 Professional as "Windows 2000 Professional Multilanguage Version," which was later extended to the Windows 2000 Server family. This technology is now called Multilingual User Interface Pack, referred to as MUI.

Why should I need an English message?

When you know exactly the original English message then you can search for it on the Internet and find out an artical or some other resources regarding the message in a common computer language.

See catalog page for all messages.