June 24, 2013
Internationalization (I18n) and localization (L10n) are two of the most important phases in software's engineering life cycle in order to create worldwide applications that function for different cultures, languages and locations. I18n and L10n are usually controlled server side by managed programming languages such as Microsoft ASP.NET, where resource files (*.resx) provide the foundation of the process and by using the Microsoft .net framework the application can display the correct language and locale based on the user choice, IP addresses, domains etc…
In the above case, if the website UI displays Arabic, normally all client-side alerts should be displayed using the same language. Based on this, the L18n/l10n becomes a must in order to ensure the application overall integrity. The following approach describes one of the ways suggested to internationalize client-side languages:
var key="value" ; (i.e. var EmailError= "Invalid Email Format!")
var EmailError="بريدإلكتروني خطأ!";
Also we can add a simple input field and a submit button.
The expected behavior should be receiving client-side messages in same language as the webpage overall UI : For English UI Wrong email address will raise the error warning in English
Behind the scene, there are a few easy and quick steps to enable the above localization approach:
First, add a script manager control to the page and enable script localization attribute:
<asp:ScriptManager ID="spManager" runat="server" EnableScriptLocalization="true">
<asp:ScriptReference Path="/Scripts/StringResources.js" ResourceUICultures="ar-EG" />
To retrieve the correct localized Message based on the user input a simple routine can be coded to validate the data entered and raise the correct error or warning message accordingly
Alert([key]) ; Example: alert("wrongFormat");
Alert([key]) ; Example: alert("required");
The above simple demo shows one of the ways to internationalize and localize client-side programming languages and highlights the importance of this process for multilingual applications.
SIDENOTE: GPI has developed a very strong Globalization Tool Suite - "G11Tool" which is able to identify areas inside server or client-side programming languages that require localization and also externalizes the content from almost any file format or programming language and exports them in ready to translate format such as ttx, *.resx and others. This application saves our engineers and yours a lot of time, effort and money when globalizing your websites and web-applications.
Further Localization and Globalization Resources
GPI, a premiere translation agency has created a more extensive overview of website globalization for several global markets in a series of Website Globalization and E-Business Series white papers, which you may download for free. You may also benefit by reviewing the following resources on different aspects of translation and localization:
- Localization for Microsoft .NET Web Applications
- Challenges with Multilingual Software and Website Testing
- Why Internationalize Your Code Base
- What to consider for Mobile Application Localization
- Software localization and internationalization (Quick Facts)
To further understand the entire software globalization process, you should download our PDF Software Globalization Guide.
Globalization Partners International helps customers enter new markets by providing comprehensive web localization and translation services into a variety of languages. Free translation quotes can also be obtained from GPI by submitting source files through our Request a Translation Quote.
You may contact GPI at email@example.com or at 866-272-5874 with your specific questions about your target global markets and your project goals.
Currently, there are no comments. Be the first to post one!
Ayman El Badawy - Manager, Technical Delivery - Global Software Practice