[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.

> >
> >Also, using the primary language as the tag discourages clean
> >localization patterns, where the author of the code should be collecting 
> >his locale dependent messages in one place so that translators can 
> >easily translate the messages without having to seek them out in the 
> >code.
> That's a tools issue.  gettext has tools the automatically generates
> pre-translation files, containing each message to be translated, as
> well as its context (file and line).
Yes, but it discourages clean usage for those systems that aren't using
gettext (or similar) as a backend.  I agree that tools could be written
to remedy this problem.

> A major advantage of of using the primary language message as the tag
> is that it makes the program easier to understand, since when you
> read the program you *see* what kind of message is emitted.
> Which do you prefer:
>   (put-message 'hello user)
> or:
>   (format (gettext "Hello ~a!") user)
> I would find the latter more informative.

One could argue that comments could provide similar information.  I
think though that the argument of cleanly separating user interface data
and program logic is a stronger one.


Attachment: pgpsYeYK74MvH.pgp
Description: PGP signature