From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8813 Path: main.gmane.org!not-for-mail From: Ralph Schleicher Newsgroups: gmane.emacs.gnus.general Subject: Re: Internationalization Date: 17 Nov 1996 23:59:17 +0100 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035148928 14531 80.91.224.250 (20 Oct 2002 21:22:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:22:08 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: Original-Received: (qmail 31321 invoked from smtpd); 17 Nov 1996 23:30:45 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 17 Nov 1996 23:30:44 -0000 Original-Received: from happy.informatik.uni-ulm.de (root@happy.informatik.uni-ulm.de [134.60.68.63]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 18 Nov 1996 00:18:25 +0100 Original-Received: from donau by happy.informatik.uni-ulm.de with uucp (Smail3.2 #1) id m0vPGTl-0000XQC; Mon, 18 Nov 1996 00:18:21 +0100 (MET) Original-Received: by donau.in-ulm.de (/\==/\ Smail3.1.25.1 #25.10) id ; Mon, 18 Nov 96 00:02 MET Original-Received: from bravo.purple.UL.BaWue.DE (rs@bravo.purple.UL.BaWue.DE [192.168.42.2]) by alfa.purple.UL.BaWue.DE (8.6.10/8.6.10) with ESMTP id XAA07932; Sun, 17 Nov 1996 23:59:20 +0100 Original-Received: (from rs@localhost) by bravo.purple.UL.BaWue.DE (8.6.10/8.6.10) id XAA03832; Sun, 17 Nov 1996 23:59:18 +0100 Original-To: Lars Magne Ingebrigtsen In-Reply-To: Lars Magne Ingebrigtsen's message of 10 Nov 1996 16:31:18 +0100 Original-Lines: 94 X-Mailer: Gnus v5.2.40/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:8813 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8813 Lars Magne Ingebrigtsen cited below with "Larsi" writes: Larsi> If such a thing was to be done, how should one do it? Has there been Larsi> done work in this area for other Elisp packages? Yes, I've finished `gettext.el' that evening (many thanks to Ulrich Drepper for all the comments in the source code of the `libintl' library). This Elisp package is intended for those users who cannot patch their Emacs or if the user have to work with an old version of Emacs not supporting GNU gettext. BTW Larsi, have you talked with RMS about your idea? Nevertheless, we should synchronize the calling conventions of the C and Lisp solution. Here are the documentation strings of my public definitions. Any comments would be appreciated. Variable: gettext-default-directory "/usr/share/locale" Where the system's locale database can be found. Variable: gettext-directory-alist nil Alist of alternate domain locations. Cons cells are of the form (DOMAIN . DIRECTORY) Function: gettext-bind-domain (DOMAIN DIRECTORY) Specify that the message catalogs of DOMAIN can be found in DIRECTORY. Variable: gettext-domain "messages" The current message catalog. Automatically becomes buffer-local when set in any fashion. Function: gettext-domain (DOMAIN) Set the current message catalog to DOMAIN (a string). If DOMAIN is `nil', then return the current domain. If DOMAIN is `""', then reset to the default of `messages'. Function: gettext-guess-locale () Guess value of current locale from environment variables. This function first looks at the value of the environment variable `LANGUAGE'; which is a GNU extension. If `LANGUAGE' is not set, then the standard POSIX variables `LC_ALL', `LC_MESSAGES', and `LANG' will be looked up. If none of these variables is set, then `"POSIX"' is returned. Variable: gettext-locale nil The current locale. Automatically becomes buffer-local when set in any fashion. Function: gettext (DOMAIN MESSAGE &optional LOCALE-PATH) Look up MESSAGE in the DOMAIN message catalog. If not found, returns MESSAGE itself (the default text). If DOMAIN is `nil', then look up MESSAGE in the current domain. If DOMAIN is `""', then look up MESSAGE in the `messages' domain. Optional third argument LOCALE-PATH overrides the current locale. LOCALE-PATH is a colon-separated list of locales. A single locale can be specified in either XPG `language[_territory[.codeset]][@modifier]' or CEN `language[_territory][+audience][+special][,sponsor][_revision]' syntax. All parts except `language' are optional. If a given locale can not be found, then the most specific one is looked up by stripping of the optional parts in the order `revision', `sponsor', `special', `codeset', `territory', and `audience/modifier'. Variable: little-endian Byte order of little endian machines. Variable: big-endian Byte order of big endian machines. Variable: pdp-endian Byte order of PDP endian machines. Function: byte-order Byte order for this particular machine. -- Ralph * http://www.UL.BaWue.DE/~rs/ GNU -- vivat, crescat, floreat!