1 ;;; erc-lang.el --- provide the LANG command to ERC
3 ;; Copyright (C) 2002, 2004, 2006, 2007 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, or (at your option)
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; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 ;; Boston, MA 02110-1301, USA.
30 ;; This provides two commands: `language' is for everyday use, and
31 ;; `erc-cmd-LANG' provides the /LANG command to ERC.
37 (defvar iso-638-languages
45 ("az" . "Azerbaijani")
47 ("be" . "Byelorussian")
51 ("bn" . "Bengali; Bangla")
74 ("gd" . "Scots Gaelic")
79 ("he" . "Hebrew (formerly iw)")
84 ("ia" . "Interlingua")
85 ("id" . "Indonesian (formerly in)")
86 ("ie" . "Interlingue")
95 ("kl" . "Greenlandic")
105 ("lt" . "Lithuanian")
106 ("lv" . "Latvian, Lettish")
109 ("mk" . "Macedonian")
122 ("om" . "(Afan) Oromo")
126 ("ps" . "Pashto, Pushto")
127 ("pt" . "Portuguese")
129 ("rm" . "Rhaeto-Romance")
133 ("rw" . "Kinyarwanda")
137 ("sh" . "Serbo-Croatian")
168 ("vi" . "Vietnamese")
172 ("yi" . "Yiddish (formerly ji)")
177 "Alist of ISO language codes and language names.
178 This is based on the technical contents of ISO 639:1988 (E/F)
179 \"Code for the representation of names of languages\".
181 Typed by Keld.Simonsen@dkuug.dk 1990-11-30
182 <ftp://dkuug.dk/i18n/ISO_639>
183 Minor corrections, 1992-09-08 by Keld Simonsen
184 Sundanese corrected, 1992-11-11 by Keld Simonsen
185 Telugu corrected, 1995-08-24 by Keld Simonsen
186 Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson
187 Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson
188 Sinhalese corrected, 1995-10-10 by Michael Everson
189 Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen
190 Sangro corrected to Sangho, 1996-07-28 by Keld Simonsen
192 Two-letter lower-case symbols are used.
193 The Registration Authority for ISO 639 is Infoterm, Osterreichisches
194 Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.")
196 (defun language (code)
197 "Return the language name for the ISO CODE."
198 (interactive (list (completing-read "ISO language code: "
200 (message "%s" (cdr (assoc code iso-638-languages))))
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