CLIM mail archive
[Prev][Next][Index][Thread]
Multilingual (French, English...) applications - any hints?
-
To: clim@BBN.COM
-
Subject: Multilingual (French, English...) applications - any hints?
-
From: Schneider Daniel <schneide@divsun.unige.ch>
-
Date: Tue, 30 Nov 1993 11:38:36 +0100
-
Content-Identifier: 984
-
X400-Content-Type: P2-1984 (2)
-
X400-Mts-Identifier: [/PRMD=switch/ADMD=arcom/C=ch/;931130113836]
-
X400-Originator: schneide@divsun.unige.ch
-
X400-Received: by mta chx400.switch.ch in /PRMD=switch/ADMD=arcom/C=CH/; Relayed; Tue, 30 Nov 1993 11:38:49 +0100
-
X400-Received: by /PRMD=SWITCH/ADMD=ARCOM/C=CH/; Relayed; Tue, 30 Nov 1993 11:38:41 +0100
-
X400-Received: by /PRMD=switch/ADMD=arcom/C=ch/; Relayed; Tue, 30 Nov 1993 11:38:36 +0100
-
X400-Recipients: clim@bbn.com
I wonder whether somebody has been confronted with writing
multi-lingual applications using CL and CLIM. There are three
different kinds of strategies as far as I can see:
(1) Compile time conditionalization with #+ macros
(2) Load time switching using load-time-value (see example below)
(3) Run time switching by calling a function
Solution 2 is good enough for us. 3 may be less efficient an take more
space too.
There are other issues involved, such as the question whether to put
strings in lookup tables (makes code smaller, but maybe not as readable)
or leave them in the code.
==> Could somebody do me the favor and tell:
- whether the code below is the corrrect thing to do?
- whether there are smarter solutions for our kind of problem
- give any other useful comment
THANX A LOT - Daniel
----- cut here ---
;;; -*- Mode: LISP; Syntax: Common-lisp; Package: clim-user; Base: 10 -*-
;; (defvar *language* nil)
;; (setq *language* 'e)
(defun select-language (list)
(if (eq *language* 'f)
(cadr list)
(car list)))
(defmacro ll (&rest list)
`(load-time-value (select-language (quote ,list))))
(defun test ()
(format t "~s" (ll "English string" "French string")))
-------------------
Daniel K.Schneider, TECFA (Educational Technologies and Learning)
Faculte de Psychologie et des Sciences de l'Education, University of Geneva,
9 route de Drize, 1227 Carouge(Switzerland),
Phone: (..41) 22 705 9694, Fax: (..41) 22 342 89 24
Internet: schneide@divsun.unige.ch (and various national nets) | if reply
X400: S=schneide;OU=divsun;O=unige;PRMD=switch;ADMD=arcom;C=ch | does not
uucp: mcvax!cui!divsun.unige.ch!shneider | work, try
BITNET: schneide@cgeuge51 | one of
DECNET: UGUN2A::SCHNEIDE (local Swiss) | these
Follow-Ups:
Main Index |
Thread Index