I can see some of the benefits from automated tools like gettext, but still it seems awfully complicated. All these files and command-line tools.
They way I do it was inspired by the system in Java. Basically I have a file with variables like
PHP Code:
$text_profile_welcome = "welcome to your profile"
where the middle portion of the variable is the file name and the final part is a descriptor.
These are kept in a file called language_en.php or language_fr.php etc etc. Then I do an include at the top of each page
PHP Code:
if (!$language) {
include($abs_path."/language_en.php");
} else {
include($abs_path."/language_".strtolower($language).".php");
}
In my mind not only is that easier but it's going to be faster than reading text files etc etc
Jason