[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The SRFI doesn't discuss any existing localization APIs.
I suggest it might be a better to come up with an API
that can work with existing tools and standards. Specifically,
I would recommend an API that can be implemented using the
GNU gettext package.
I suggest these two functions:
(textdomain 'PACKAGE-NAME [LOCALE-DIR])
Look for translations for the package named PACKAGE-NAME.
The translation files are in LOCALE-DIR, which has an
Look for a translation for "MESSAGE". If one is found,
return it; otehrwise return "MESSAGE" unchanged.
(display (format (gettext "Hello, ~a!") myname))
A trivial no-op implementation:
(define (textdomain . args) 'ignore)
(define (gettext msg) msg)