1 ;;; liece-intl.el --- Localized messages for IRC.
2 ;; Copyright (C) 1998-2000 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
7 ;; Keywords: IRC, liece
9 ;; This file is part of Liece.
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
34 (require 'liece-compat))
38 (defgroup liece-intl nil
39 "Convert messages to localized them"
42 (defcustom liece-intl-catalogue-directory nil
43 "Normal position of PO files."
47 (defcustom liece-intl-use-localized-messages t
48 "If non-nil display localized messages."
52 (defvar liece-intl-message-alist nil)
53 (defvar liece-intl-default-mime-charset 'x-ctext)
54 (defvar liece-intl-mime-charset nil)
55 (defvar liece-intl-domain "liece")
58 (defmacro liece-intl-get-msgstr (msgid)
59 `(if liece-intl-use-localized-messages
60 (dgettext liece-intl-domain ,msgid)
64 (defalias '_ 'liece-intl-get-msgstr)
66 (defun liece-intl-load-catalogue ()
67 (if (null liece-intl-catalogue-directory)
68 (setq liece-intl-catalogue-directory
69 (liece-locate-path "po")))
70 (bind-text-domain liece-intl-domain liece-intl-catalogue-directory))
74 ;;; liece-intl.el ends here