From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8730 Path: main.gmane.org!not-for-mail From: William Perry Newsgroups: gmane.emacs.gnus.general Subject: Re: Internationalization Date: Mon, 11 Nov 1996 07:14:33 -0800 Message-ID: <199611111514.HAA17526@newman.in.aventail.com> References: Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148856 14005 80.91.224.250 (20 Oct 2002 21:20:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:20:56 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: Original-Received: (qmail 27435 invoked from smtpd); 11 Nov 1996 15:37:47 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 11 Nov 1996 15:37:46 -0000 Original-Received: from newman.in.aventail.com (root@newman.aventail.com [38.225.141.10]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 11 Nov 1996 16:16:29 +0100 Original-Received: from kramer.in.aventail.com.aventail.com (root@newman [192.168.1.1]) by newman.in.aventail.com (8.6.12/8.6.9) with SMTP id HAA17526; Mon, 11 Nov 1996 07:14:33 -0800 Original-To: Per Abrahamsen In-Reply-To: Errors-to: wmperry@aventail.com X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 > >I hate the whole idea, but if it *must* be done I think there should >be at least these requirements: > >* It must not be Gnus specific. Correct. >* There should be _zero_ overhead for a user of the English version. Well, I would rephrase this to be 'zero overhead for a user of the originating language version'. If lars all of a sudden decides to only speak french (even in lisp), then so be it. :) >* There should be _zero_ new stuff to learn for an English speaking > programmer. similar rephrasing to point #2. >I suggested this implementation when someone wanted to make a French >version of AUC TeX. It follows all 3 requirements. > >;;; trans-fr.el --- French translation of message strings > >;;; Code: > >(fset 'raw-message (symbol-function 'message)) > >(defvar translate-message-alist > '(("hello" "bonjour"))) > >(defun translate-message (format &rest args) > (let ((trans (assoc format translate-message-alist))) > (apply 'raw-message (or (nth 1 trans) format) args))) > >(fset 'message (symbol-function 'translate-message)) You would have to hook more than 'message'. You would definitely have to hook error, and possible a few other places. And any custom format-like functions would have to be modified by the package author as well. I like the gettext() approach, and have been considering something similar in Emacs-W3 for a while, just haven't gotten around to it. -bill p.