From: Masao Mutoh Date: 2004-04-27T16:31:10+09:00 Subject: Re: Approaches to localization? Hi, On Tue, 27 Apr 2004 03:09:03 +0900 ptkwt@aracnet.com (Phil Tomson) wrote: > I'm developing a GUI app using Ruby and FLTK. One of the requirements > that's come up lately is that this app should be 'localizable'. I'm trying > to figure out approaches for doing this as I design the app. > Does this seem like a reasonable approach? If you think it to be general library, You need to consider some issues. For examples, - File encoding. It may be no problem to use UTF-8 only, though. - How to include values from the program. As Austin says, you may need to support similer printf style. - Plural sentence * Sometimes we want to separate "Find a file" / "Find files" as a dialog message. And some languages need 3 or 4 variations to express this kind of a message. - Maintainability * Developers may need to create the XML file automatically. * Translaters need to update when the program is updated. The developer needs to prepare "diff" program for that. - How to select the language when you execute the program. You may need to use environment variables(LC_ALL, LC_CTYPE..). But some environment(like Windows) doesn't support them. So you may need to write a wrapper for it. Anyway, I recommand to read GNU GetText online manual[1] once. > Has anyone used alternate approaches? IMO, Ruby-GetText-Package[2] is suitable for GUI applications. You can use many tools for maintaince the locale files. And the above issues have already solved. Actually, some projects have already used it. For example, rbbr[3] has already supported 11 languages with Ruby-GetText-Package. [1] http://www.gnu.org/software/gettext/manual/html_chapter/gettext_toc.html [2] http://ponx.s5.xrea.com/hiki/ruby-gettext.html [3] http://ruby-gnome2.sourceforge.jp/hiki.cgi?rbbr -- .:% Masao Mutoh