Improved Language Handling

I think its time to make some changes to the way the language translations are handled in Retrospect-GDS. With the addition of several new languages recently, some issues have come up with displaying the proper character sets.

Gettext is currently used to handle the translation functions, but it seems to be creaking under the strain. The biggest issue is that gettext relies on several other libraries to handle the character code conversion, and those libraries seem to differ from system to system. In other words, on some systems everything works fine, on other systems you get garbled characters.

I am proposing to cut gettext out of the picture altogether. Instead, each language will have one file full of replacement strings and this file will be encoded with UTF-8 (Unicode) for all languages. The output character set in the html header will also be be set to UTF-8. In my testing so far, this has worked perfectly on all systems. This method has the added benefit that you do not need to recompile the gettext translation files after making a modification to a translation.

Comments are closed.