From: ueno Date: Sun, 12 May 2002 02:51:40 +0000 (+0000) Subject: * gettext.el (gettext-default-locale): New variable. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62437da8b238e6b5e0f3c2c0c780f114d61dca32;p=elisp%2Fliece.git * gettext.el (gettext-default-locale): New variable. (bind-text-domain): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7faa0f3..7cb03b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-05-12 Daiki Ueno + + * gettext.el (gettext-default-locale): New variable. + (bind-text-domain): Use it. + 2002-05-07 Daiki Ueno * gettext.el (gettext-mapcar*): Eliminate recursion. diff --git a/lisp/gettext.el b/lisp/gettext.el index 31f5740..c795e0e 100644 --- a/lisp/gettext.el +++ b/lisp/gettext.el @@ -47,6 +47,7 @@ (defvar gettext-message-domain-to-catalog-alist nil) (defvar gettext-default-message-domain "emacs") (defvar gettext-default-mime-charset default-mime-charset) +(defvar gettext-default-locale "C") (defconst gettext-msgid-regexp "msgid\\s-*\"") (defconst gettext-msgstr-regexp "msgstr\\s-*\"") @@ -245,7 +246,8 @@ Return the list of results." Here's how the path to message files is constructed under SunOS 5.0: {pathname}/{LANG}/LC_MESSAGES/{domain}.mo \[XEmacs I18N level 3 emulating function]" - (let* ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG"))) + (let* ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG") + gettext-default-locale)) (language (progn (string-match "\\([^_.]+\\)\\(_[^.]+\\)?\\(\\.[^@]+\\)?" lang)