On Evolt.org today, there's a new post that takes a look at localization with PHP and the TMX standard.
With the arrays, PHP provides a useful solution for localization. Indeed, it's possible to extract the textual elements from the original source code and isolating them as array elements. An array in PHP is actually an ordered map. A map is a type that maps values to keys. This type is optimized in several ways, so you can use it as a real array, or a list (vector), hashtable (which is an implementation of a map), dictionary, collection, stack, queue and probably more.
One of the main concerns of internationalization consists of separating the main source code from the texts, the labels, the messages and all the other objects related to the specific language in use. This facilitates the translation process as such as all the resources related to the local language context are well identified and separated.
The TMX standard is the open standard that uses XML for the archiving and mutual exchange of the Translation Memories (TM). These memories are created by using specific translation and localization software called CAT software (Computer Aided Translation).
They're basically advocating the storage of content in XML files specifically created for this software to go in and make the translations automatically. It's a pretty cool idea, but I wish they'd chosen to use the DOM functionality in PHP for the XML parsing - though I guess the expat way is a bit more backwards-compatible...




