Next: , Previous: Level 3 Basics, Up: I18N Level 3


65.2.2 Level 3 Primitives

— Function: gettext string

This function looks up string in the default message domain and returns its translation. If I18N3 was not enabled when XEmacs was compiled, it just returns string.

— Function: dgettext domain string

This function looks up string in the specified message domain and returns its translation. If I18N3 was not enabled when SXEmacs was compiled, it just returns string.

— Function: bind-text-domain domain pathname

This function associates a pathname with a message domain. Here's how the path to message file is constructed under SunOS 5.x:

          {pathname}/{LANG}/LC_MESSAGES/{domain}.mo

If I18N3 was not enabled when SXEmacs was compiled, this function does nothing.

— Special Form: domain string

This function specifies the text domain used for translating documentation strings and interactive prompts of a function. For example, write:

          (defun foo (arg) "Doc string" (domain "emacs-foo") ...)

to specify emacs-foo as the text domain of the function foo. The “call” to domain is actually a declaration rather than a function; when actually called, domain just returns nil.

— Function: domain-of function

This function returns the text domain of function; it returns nil if it is the default domain. If I18N3 was not enabled when SXEmacs was compiled, it always returns nil.