.NET is a developer platform that contains many tools, programming languages, and libraries to build apps and the process of application localization.
ASP.NET is one of the most common web application development platforms. As with any other .NET framework application, ASP.NET provides great support straight out of the box.
In order to save money, reduce localization/internationalization defects and shorten the time to market, it’s important to consider localization as part of the development process.
ASP.NET Application Localization: What to Localize/Translate?
In a typical ASP.NET application, the following four items may differ depending on the user’s language and regional preferences:
- Text resources – The text that resides in the aspx page. Both asp server tags and traditional html tags may contain text on an aspx page. This includes the UI text that may appear in C-Sharp(C#) and Visual Basic code behind files.
- Database content – Most of the translatable text resides in a database for a typical ASP.NET application particularly in content management systems (product information, articles etc.).
- Images and graphics – Graphics and images may contain translatable text.
- Regional options – Date/time, currency, number/decimal formatting will vary depending on the user’s region and/or preferences.
Application Localization Text Resources
All text resources should be externalized to resx files in order to make translation and maintenance easier.
Also known as “resources file”, a resx file consists of XML entries which specify objects and strings. Visual Studio provides an automated way to externalize the strings after the page is created but this function is limited. It only works on the server tags on aspx pages. Visual Studio cannot externalize the text in CS/VB code or process regular html tags.
Externalize the tags as you develop the pages. More information on the use of resx files for ASP.NET localization can be found on MSDN.
The database schema and relations will have to be carefully designed to externalize translatable text to a table(s) which maps to languages and parent tables.
Although adding additional columns to existing tables for each language may seem easier; maintenance of this solution is extremely difficult and not recommended.
Images and Graphics
If possible, try avoiding images and graphics with embedded text. Using background images and retrieving the text from a resource file will make the localization effort much easier.
If that’s not possible, point the source of the image to the resx file. That will let you easily change it depending on the language. This applies to other external assets such as pdf and doc files as well.
As in any other programming language and platform, avoid manually formatting and hard coding date/time and number formats.
.NET offers a CultureInfo class which provides access to culture-specific instances of objects such as: DateTimeFormatInfo and NumberFormatInfo.
Using these objects, culture-specific operations can be performed easily such as formatting dates and numbers, casing and comparing strings.
World-readiness, also known as globalization or internationalization, is crucial for creating a globally viable product. This applies to everything from marketing material copy to the text strings in a mobile app.
Localization best practices will make the process easier—saving you time and money.
Globalize Your Customer Support with Chatbot Localization
Does your chatbot sound like it’s from another country? Make your bot part of every customer’s community, ...
The Complete Guide to App Localization & Translation
Your app has to be able to travel far and wide while providing an equally amazing experience to anyone who...