Michel Fortin, el 2 de marzo a las 07:30 me escribiste: > On 2009-03-02 01:04:47 -0500, Andrei Alexandrescu > <seewebsiteforem...@erdani.org> said: > > >Good idea. But before we do so, I was hoping I'd pick the brains of people > >who have used locales in other languages and understand the burning points. > >Somehow, > >however, I'm doing a lousy job at eliciting contributions from people on > >this newsgroup (guess I'd be a lousy salesman). I tried a couple of times > >and all I got > >was a few new keyword proposals and a few new syntax proposals :o). What am > >I doing wrong? > > I think there are three aspects to localization. One is date and number > formating. Another is offering a facility for translating all the > messages an application can give. And the last one is the configuration > part, where you know which format to use.
I think you are confusing localization (l10n) with internationalization (i18n)[1]. Locales is about l10n, it's numbers and date formats, time zones, etc. i18n is about translations. I've used the standard C API for localization and I found it quite simple and good. What's wrong with it? I've used gettext[1] too (which is almost a de-facto standard in unix), and even when it could be improved I think it does a pretty good job, and it has a lot of very subtle problems solved. I think l10n and i18n should be taken with a lot of care, because it's very hard to get it right (like concurrency ;). There are a lot of rough edges and exceptions to thing that at first sight looks so universal that makes very easy to make a bad desing (like plural forms[3]). The gettext manual[4] is a great source to see how big this is. Gettext is supported in most major programming languages, so I think D could greatly benefit from using it too. [1] http://en.wikipedia.org/wiki/Internationalization_and_localization [2] http://www.gnu.org/software/gettext/ [3] http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms [4] http://www.gnu.org/software/gettext/manual/gettext.html -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- I always get the feeling that when lesbians look at me, they're thinking, '*That's* why I'm not a heterosexual.' -- George Constanza