Re: Using Japanese and English strings, encodings
- From: "drrobot" <drrobot@xxxxxxxxx>
- Date: 14 Apr 2006 08:01:13 -0700
Wow! I never expected that the guy who wrote one of my favorite books
on lisp would also be the one answering my questions! Many thanks on
the book; I refer to it often.
I'm a bit surprised that Lisp macros have to evaluate always to a list
or a single value; I was sure there was some sort of way of getting
them to evaluate to multiple or zero values like the ordinary functions
they (superficially) resemble.
As a bit of background may clarify why I wanted to do this. I'm an
american grad student in Japan right now, and I often find myself
writing documents twice, once in english, and once in japanese, over
and over again, and getting annoyed at the constant back-and-forth
revisions required to both documents.
I found it a useful time-saver to write all my research reports as Lisp
source file, and use some scripts I wrote a while ago to transform the
lisp source file into something else (either LaTeX document or
HTML/XML) using some very, very simple macros and some perl scripts
from before I came to Japan.
Lisp's nice treatment of code and data is especially convenient, as
sometimes I need to write more of a "program" for engineering problems,
where the 'lookup table' approach to localization works great because I
rarely need to change the program's strings and if they are seperated
in different files it doesn't matter so much. Other times, however, I
need to write more of a "document" which works for multiple languages,
and since the lisp-expressions->LaTeX stuff I wrote doesn't know
anything about Japanese, I was hoping a nice macro hack could save me
the trouble of having to mess with my old code again.
So basically, I was willing to forgive something that was a little
ugly/weird, if it meant that I could continue using just simple lists
that my simple scripts could process as both executable code when
convenient, or other times treat it like the static data, as XML in
s-expression form. Which is why I'm still sort of mixing my solutions
to the multiple-language problem.
Anyway, thanks again for your help. I like the dump-messages idea, that
would be nice for those cases where it's tolerable to put the
translations in seperate places.
.
- Follow-Ups:
- Re: Using Japanese and English strings, encodings
- From: Pascal Bourguignon
- Re: Using Japanese and English strings, encodings
- From: Peter Seibel
- Re: Using Japanese and English strings, encodings
- References:
- Using Japanese and English strings, encodings
- From: drrobot
- Re: Using Japanese and English strings, encodings
- From: Peter Seibel
- Using Japanese and English strings, encodings
- Prev by Date: Re: Server-client model
- Next by Date: Re: Using Japanese and English strings, encodings
- Previous by thread: Re: Using Japanese and English strings, encodings
- Next by thread: Re: Using Japanese and English strings, encodings
- Index(es):
Relevant Pages
|