Gnus development mailing list
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
Subject: Re: Internationalization
Date: 10 Nov 1996 20:02:41 +0100	[thread overview]
Message-ID: <jpn2wpixim.fsf@tintin.lysator.liu.se> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of 10 Nov 1996 16:31:18 +0100

Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

> If such a thing was to be done, how should one do it?  Has there been
> done work in this area for other Elisp packages?

Yes, it has been done. We here at Lysator have our own conferncing
system, LysKOM, with an Emacs client. (More information at
<URL:http://www.lysator.liu.se/lyskom/> (in Swedish) and
<URL:ftp://ftp.lysator.liu.se/pub/lyskom/>).

This elisp client is available in both Swedish and English, and in the
latest, unreleased, version it is possible to switch languages while
running. All strings are retrieved with (lyskom-get 'string-symbol),
and in the latest version you can also specify a message catalogue as
an optional second argument.

It was implemented as a simple alist before, but we have now moved to
useing symbol properties instead.

We use symbols to identify the strings. I don't believe it would be a
good idea to use strings for that.

Now for some example code:

;; lyskom-get-string gets a string from a message catalog (category)

(defsubst lyskom-get-string-internal (symbol category)
    (cdr (assq lyskom-language (get symbol category))))

(defsubst lyskom-get-string-error (function symbol category)
  (signal 'lyskom-internal-error
	  (list function (list symbol category ": string not found"))))

(defun lyskom-get-string (symbol &optional category)
  "Returns string assiciated with SYMBOL"
    (or (lyskom-get-string-internal symbol (or category 'lyskom-message))
        (lyskom-get-string-error 'lyskom-get-string
                                 symbol
                                 (or category 'lyskom-message))))

;; From file swedish-strings.el

(lyskom-language-strings lyskom-message sv
  '(
    (server-q . "LysKOM-server? (%#1s) ")
    (try-connect . "LysKOM elisp-klient version %#1s.\nF\366rs\366ker koppla upp mot %#2s.\n")
    (protocoll-error . "Protocol error. Servers says: %#1s")
    (connection-done . "Uppkopplingen klar. Serverns versionsnummer \344r %#1s.\n\n")
    (what-is-your-name . "Vad heter du? ")
    (password . "L\366senord? ")
    (wrong-password . "Fel l\366sen.\n")
    (are-logged-in . "Du \344r nu inloggad. V\344nta ett tag.\n")
    (you-have-motd . "\nDu har en lapp p\345 d\366rren:\n\n")
    ...))

;; From file english-strings.el

(lyskom-language-strings lyskom-message en 
  '(
    (server-q . "LysKOM server? (%#1s) ")
    (try-connect . "LysKOM elisp client version %#1s.\nAttempting to connect to %#2s.\n")
    (protocoll-error . "Protocol error. Servers says: %#1s")
    (connection-done . "Connection established. Server version is %#1s.\n\n")
    (what-is-your-name . "What is your name? ")
    (password . "Your Password? ")
    (wrong-password . "Incorrect password\n")
    (are-logged-in . "You have entered LysKOM. Please wait...\n")
    (you-have-motd . "\nYou have a note on your door:\n\n")
    ...))

We also have language-dependent keymaps, variables and menus.

If you're interested, I could send you the rest. You might even want
to try LysKOM yourself, it is quite addictive :-)

-- 
David Kågedal     Lysator Academic Computer Society       davidk@lysator.liu.se
http://www.lysator.liu.se/~davidk/                              +46-13 17 65 89


  parent reply	other threads:[~1996-11-10 19:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-10 15:31 Internationalization Lars Magne Ingebrigtsen
1996-11-10 17:05 ` Internationalization Andy Eskilsson
1996-11-10 17:51   ` Internationalization Kai Grossjohann
1996-11-10 19:02 ` David Kågedal [this message]
1996-11-11  6:27   ` Internationalization Steinar Bang
1996-11-11 15:20   ` Internationalization Lars Magne Ingebrigtsen
1996-11-11  0:25 ` Internationalization visigoth
1996-11-11 15:25   ` Internationalization Lars Magne Ingebrigtsen
1996-11-11 22:19     ` Internationalization David Moore
1996-11-12 22:45       ` Internationalization Lars Magne Ingebrigtsen
1996-11-11 12:14 ` Internationalization Robert Bihlmeyer
1996-11-11 12:50 ` Internationalization Per Abrahamsen
1996-11-11 15:14   ` Internationalization William Perry
1996-11-11 15:24     ` Internationalization Per Abrahamsen
1996-11-11 22:01   ` Internationalization François Pinard
1996-11-12 10:58     ` Internationalization Per Abrahamsen
1996-11-12 15:59       ` Internationalization François Pinard
1996-11-12 16:57         ` Internationalization Ulrich Drepper
     [not found]           ` <rjwwvqgxz1.fsf@babbage.dina.kvl.dk>
     [not found]             ` <x7ralyf6rx.fsf@myware.rz.uni-karlsruhe.de>
     [not found]               ` <rj3eydhwx5.fsf@babbage.dina.kvl.dk>
1996-11-14 12:28                 ` Internationalization François Pinard
1996-11-12 22:07         ` Internationalization Lars Magne Ingebrigtsen
1996-11-13 19:19           ` Internationalization Jan Vroonhof
1996-11-13 22:05             ` Internationalization William Perry
1996-11-14 19:27               ` Internationalization Ralph Schleicher
1996-11-12 20:12   ` Internationalization Jan Vroonhof
1996-11-11 21:35 ` Internationalization François Pinard
1996-11-12  1:57   ` Internationalization Ulrich Drepper
1996-11-12 19:56   ` Internationalization Lars Magne Ingebrigtsen
1996-11-12 22:40     ` Internationalization Ulrich Drepper
2002-10-20 21:21     ` Internationalization François Pinard
1996-11-17 22:59 ` Internationalization Ralph Schleicher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jpn2wpixim.fsf@tintin.lysator.liu.se \
    --to=davidk@lysator.liu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).