From: ueno Date: Wed, 20 Mar 2002 20:02:09 +0000 (+0000) Subject: * gettext.el (bind-text-domain): Respect LC_ALL and LC_MESSAGES; X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7e6fb8c3d3322f0e061841d1c8f004b64011a0ef;p=elisp%2Fliece.git * gettext.el (bind-text-domain): Respect LC_ALL and LC_MESSAGES; reverse lang-paths. --- diff --git a/lisp/gettext.el b/lisp/gettext.el index 5616eb5..ef29bc8 100644 --- a/lisp/gettext.el +++ b/lisp/gettext.el @@ -244,7 +244,7 @@ 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 (getenv "LANG")) + (let* ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG")) (language (progn (string-match "\\([^_.]+\\)\\(_[^.]+\\)?\\(\\.[^@]+\\)?" lang) @@ -252,14 +252,14 @@ Here's how the path to message files is constructed under SunOS 5.0: (territory (match-string 2 lang)) (code-set (match-string 3 lang)) (lang-path (if lang - (delq nil (list language - (if code-set - (concat language code-set)) + (delq nil (list (if (and territory code-set) + (concat language territory + code-set)) (if territory (concat language territory)) - (if (and territory code-set) - (concat language territory code-set)))))) - + (if code-set + (concat language code-set)) + language)))) (file (concat domain ".mo")) catalog) (while (and (setq lang (car lang-path))