[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext-based localization

This page is part of the web mail archives of SRFI 29 from before July 7th, 2015. The new archives for SRFI 29 contain all messages, not just those from before July 7th, 2015.



> > Let's not re-invent the wheel.  There is a standard used by lots of Free
> > Software.  It works.  A message translation SRFI really needs to be
> > compatible with it.  I suggest at least a quick look at the gettext
> > manual: http://www.gnu.org/manual/gettext/html_chapter/gettext_toc.html
> 
> Another data point for a well established mechanism is the Java API for 
> internationalization (http://java.sun.com/products/jdk/1.1/docs/guide/intl/). 
> They use strings instead of the more elegant symbols of Scheme/Lisp, but they 
> seem to come down on the side of message tags. The code has references to 
> strings that are resource names, where resource bundles provide the 
> English/French/whatever text of the message.

A possible compromise might be to have the message tag be a string rather
than a symbol.  Those that wish to inline their messages can write their
own function that delegates to localized-template, and returns the 
message tag if localized-template returns #f.  This at least gives 
people the option of cluttering up their source or using a tool to 
de-clutter.

	Scott

Attachment: pgpYIHyXQLies.pgp
Description: PGP signature