chickadee » free-gettext » make-gettext

(make-gettext domain [locale] [dirs] [cdir] [cached?] [lookup-cached?])procedure

DOMAIN is the same as the first argument to TEXTDOMAIN, and may be similarly cascaded.

LOCALE is the locale, as a string or list of strings of the form LANG[_REGION][.ENCODING], and defaults to the LANG or LC_ALL environment variable, or C if neither is set. Multiple locales are also searched in order, which can be useful when you have incomplete translations in similar languages.

DIRS (again a string or list of strings) is the search path of directories which should hold the LOCALE/CDIR/ directories which contain the actual message catalogs. This is always appended with the system default, e.g. "/usr/share/locale", and may also inherit from the GETTEXT_PATH colon-delimited environment variable.

CDIR is the category directory, defaulting to either the LC_CATEGORY environment variable or the appropriate system default (e.g. LC_MESSAGES). You generally won't need to specify this.

CACHED? means to cache individual messages, and defaults to #t. This is a natural default (GNU gettext similarly caches messages), but during development it can be handy to disable caching if you intend to edit messages while coding.

LOOKUP-CACHED? means to cache the lookup dispatch generated by these parameters, and defaults to #t. Thus by default multiple calls to MAKE-GETTEXT with the same parameters return the same object, and they in turn share the same message cache.

MAKE-GETTEXT returns a dispatch closure with the following parameters: