I am trying to create a site similar to yahoo’s babelfish. A major difference is that I am trying to translate from English into a fictional language (ex. pig latin). I have gettext working via this tutorial: http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/
I’m finding that I have to specify a locale in the .mo file and in my php. Is there anyway of avoiding having to set a locale (as it’s a fictional language.) Should I just use English?
It does not matter if it is a fictional language or least-known minor language. You can just assign a new locale name (which is not already used in the international standard ISO 639-1) and use it. The resource file should be like message-yourlang.po , which can be accessed by the locale name “yourlang”.
For the other part of the website, you may use “en” locale and the contents translated, every time you switch with the fictional locale language. In practical use, you may define an utility function to switch locale, generate translated messages and switch back to the original locale.