<p>I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method.</p>

<p>Basically, all I have is a file with variables defining string constants.  Usually a set of arrays where an array usually refers to a particular elements of the site.</p>

<p>Then the site code just includes the appropriate file based on a flag and then echo's out the appropriate array element. </p>

<p>What are some ways of doing this to reduce maintenance headaches and performance?</p>

A couple of the most common ways to do this are:
1) Use
```
define('SOME_STRING', 'Some string');
```
- simply have a different file stuffed with these defines for each language.  This is very easy, and you don't have to use "global" all over the place.
2) Wrap strings in a function:
```
translate('My String')
```
- this is more flexible as you can parse your code to create lists of strings to translate, and add in features like variables, e.g.
```
translate('I can count to [number]', 10);
```
(of course, you normally pick a shorter function name, like "_")