In Part One of this series, I explained how you should establish a basic text rendering environment that will display non-Roman character sets.
In this entry, I’ll discuss one of the most common patterns used to get those characters onto the screen.
The objective of this exercise is to explain a basic way to allow a display (in this case, a Web page) to reuse the same framework, yet drastically change the content, depending upon the chosen language of the viewer.
I’ll use PHP as the example language. This pattern can be applied to almost any programming language, and actually tends to be supported by many development frameworks. PHP is well-understood, and also has native support for associative arrays, which makes this all much easier to explain. It is also the base language for a number of content-management systems that use this pattern for their own localization.
Read more »