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