Web Page localization is becoming a requirement for many projects now. Many development environments for C++ and other languages use the concept of a String Table to support localization. But ASP programmers must resort to home-grown methods of language externalization. My home-grown method utilizes XML. For each language supported, I have an XML file containing the local strings for that language. I also have a directory structure reflecting that mindset (e.g. ./localstrings/US/strings.xml or ./localstrings/UK/strings.xml ). I then name each local string like a descriptive variable name (e.g. strWelcomeMessage ). Then, whenever I come to a section in my page that needs a local string, I call a function to get the local string--> GetLocalString("strWelcomeMessage"). The code for GetLocalString() is below. Hope this is helpful.
Creating Localized Web Pages using ASP/XML
0 comments
Hide comments