OsakaWebbie
Programmer
What do you guys consider a standard (i.e. actually used, not deprecated or abandoned) class, script, etc. for doing internationalization? I have a PHP/MySQL application whose interface is currently just English, even though it's designed to handle data based in Japan - pretty shortsighted of me, huh! So now I want to add the option to see the interface in Japanese. There is a lot of text (labels and such) on my pages - I have gradually started adding calls to a function i18n("the text") which currently just sends back the passed text, and now I'm looking for what code I should use to handle the translations, whether from flat files, a MySQL table, or whatever. I don't have to worry about encoding, as I already require a native UTF-8 environment for my app, but I don't want to have to demand too much in the way of libraries and such, because generally it's running on shared hosts with no control over the PHP installation.
I looked around, but it seemed like everything was either dependent on less-than-totally-common libraries (or a really new version of PHP), or obscure and ignored (and therefore I have no idea if it's any good). I'm hoping for something simple, but it does need to handle sprintf-type grammar differences, not just plain strings. So far the one that looks the most straightforward is by flaimo, aptly called i18n, but it seems ignored for the last two years and not used by anyone, so that makes me wonder. I haven't tried using it or anything else yet - I thought I'd first ask you guys what you use or consider standard.
I looked around, but it seemed like everything was either dependent on less-than-totally-common libraries (or a really new version of PHP), or obscure and ignored (and therefore I have no idea if it's any good). I'm hoping for something simple, but it does need to handle sprintf-type grammar differences, not just plain strings. So far the one that looks the most straightforward is by flaimo, aptly called i18n, but it seems ignored for the last two years and not used by anyone, so that makes me wonder. I haven't tried using it or anything else yet - I thought I'd first ask you guys what you use or consider standard.