My first searches seemed fruitful... I found this documentation describing Resource Bundles. It seemed great until I noticed it was under the header "Future Directions". I'm a fairly proficient programmer but I'm certainly not ready to write a patch to PHP... time to look at other options...
The best option I've found so far is called Zend_Translate. Zend's translate framework is really flexible. You can provide something as basic as arrays of words to translate or as complex as importing a Translation Memory file and dynamically translating everything. For my purposes I think I'm going to use the TMX adapter. TMX is an extension of XML and it's an industry standard for this sort of application. It can be modified in any XML editor which makes it very easy to add new translations. An example TMX file would be something like:
This example is straight from the Zend Framework website.
- <?xml version="1.0" ?>
- <!DOCTYPE tmx SYSTEM "tmx14.dtd">
- <tmx version="1.4">
- <header creationtoolversion="1.0.0" datatype="winres"segtype="sentence"
- adminlang="en-us" srclang="de-at" o-tmf="abc"
- creationtool="XYZTool" >
- <tu tuid='message1'>
- <tuv xml:lang="de"><seg>Nachricht1</seg></tuv>
- <tuv xml:lang="en"><seg>message1</seg></tuv>
- <tu tuid='message2'>
- <tuv xml:lang="de"><seg>Nachricht2</seg></tuv>
- <tuv xml:lang="en"><seg>message2</seg></tuv>