Until a couple of years ago, most software applications were released in English. Unfortunately for us the developers, nowadays, many customers require that that the product they purchased, will be localized to a specific language (other than English). I know, for instance, that there is a European law which requires healthcare products to be localized to the European market (starting from 2009 or 2010). Because this article is about how to localize your application using string tables, I recommend you to first read about a free tool which helps you extract hard coded strings to string tables. Don’t go any further before you also read about how to generate public properties for string tables, you must read it.
Setting up a String Table
I assume that you already have some user interface which needs to be localized, I will demonstrate this process with…
It is very common to use resource files in .Net applications when you need to store some data in a XML file. I usually use .resx files as string tables in order to avoid hard coded strings in my code. Two months ago, we published a post about a free tool which helps to extract hard coded strings to resource files. Notice that when you add a resource file, there is an automatically generated class with properties issued from the resources elements, so you can call this class properties instead of using the ResourceManager. The only problem with this class is that its properties are marked as internal and thus can’t be accessed externally (from other assemblies).
We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn More