1 ;;; erc-lang.el --- provide the LANG command to ERC
3 ;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 ;; Author: Alex Schroeder <alex@gnu.org>
6 ;; Maintainer: Alex Schroeder <alex@gnu.org>
8 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcLang
9 ;; Keywords: comm languages processes
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28 ;; This provides two commands: `language' is for everyday use, and
29 ;; `erc-cmd-LANG' provides the /LANG command to ERC.
35 (defvar iso-638-languages
43 ("az" .
"Azerbaijani")
45 ("be" .
"Byelorussian")
49 ("bn" .
"Bengali; Bangla")
72 ("gd" .
"Scots Gaelic")
77 ("he" .
"Hebrew (formerly iw)")
82 ("ia" .
"Interlingua")
83 ("id" .
"Indonesian (formerly in)")
84 ("ie" .
"Interlingue")
93 ("kl" .
"Greenlandic")
103 ("lt" .
"Lithuanian")
104 ("lv" .
"Latvian, Lettish")
107 ("mk" .
"Macedonian")
120 ("om" .
"(Afan) Oromo")
124 ("ps" .
"Pashto, Pushto")
125 ("pt" .
"Portuguese")
127 ("rm" .
"Rhaeto-Romance")
131 ("rw" .
"Kinyarwanda")
135 ("sh" .
"Serbo-Croatian")
166 ("vi" .
"Vietnamese")
170 ("yi" .
"Yiddish (formerly ji)")
175 "Alist of ISO language codes and language names.
176 This is based on the technical contents of ISO 639:1988 (E/F)
177 \"Code for the representation of names of languages\".
179 Typed by Keld.Simonsen@dkuug.dk 1990-11-30
180 <ftp://dkuug.dk/i18n/ISO_639>
181 Minor corrections, 1992-09-08 by Keld Simonsen
182 Sundanese corrected, 1992-11-11 by Keld Simonsen
183 Telugu corrected, 1995-08-24 by Keld Simonsen
184 Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson
185 Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson
186 Sinhalese corrected, 1995-10-10 by Michael Everson
187 Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen
188 Sangro corrected to Sangho, 1996-07-28 by Keld Simonsen
190 Two-letter lower-case symbols are used.
191 The Registration Authority for ISO 639 is Infoterm, Osterreichisches
192 Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.")
194 (defun language (code)
195 "Return the language name for the ISO CODE."
196 (interactive (list (completing-read "ISO language code: "
198 (message "%s" (cdr (assoc code iso-638-languages
))))
200 (defvar line
) ; dynamically bound in erc-process-input-line
202 (defun erc-cmd-LANG (language)
203 "Display the language name for the language code given by LANGUAGE."
204 (let ((lang (cdr (assoc language iso-638-languages
))))
207 (or lang
(concat line
": No such domain"))))
212 ;; arch-tag: 8ffb1563-cc03-4517-b067-16309d4ff97b
213 ;;; erc-lang.el ends here