[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Translations
From: |
Joris van der Hoeven |
Subject: |
Re: [Texmacs-dev] Translations |
Date: |
Thu, 7 Nov 2002 18:25:35 +0100 (MET) |
> > I have time to implement a tree-based translation scheme
> > (a couple of days of work).
>
> I would really like if you can tell us what you are up to.
Well, let me tell you a few words about this.
The idea is to translate trees into trees using
context-based pattern matching.
First of all, there will be two types of dictionaries:
dictionaries from one language into another and
dictionaries from "one language into itself".
A dictionary rule is of the form
(context source dest)
In fact rules are rather grouped like
(context
(source dest)
...
(source dest))
The context might be something like "menu" or "color-menu".
Both "source" and "dest" are trees with wildcards, like
("tree" "arbre")
((concat "The file '" #x "' does not exist")
(concat "Le fichier '" #x "' n'existe pas"))
Notice that "concat" is also used as a primitive for
string concatenation. There are two other primitives:
"translate" and "rewrite". For instance:
((concat "Write text using a " #x " font")
(concat "Ecrire du texte en utilisant une police "
(translate #x)))
The "rewrite" primitive is used for the specification of
grammar rules for a given language. For instance:
((feminin "gras") "grasse")
((feminin "vert") "verte")
Then the above rule might become
((concat "Write text using a " #x " font")
(concat "Ecrire du texte en utilisant une police "
(rewrite (feminin (translate #x)))))
The "translate" and "rewrite" primitives take an optional
argument for changing the context.
As a final primitive one might add "function", like
((feminin #x) (function french-feminin #x))
where "french-feminin" is a scheme function which
automatically computes the feminin form of a masculin word.
If you think a bit about it, these very simple primitives
will give us great power for internationalization and
they fully take advantage out of the Scheme language...
As you will also recognize, all this should not be
very hard to implement. So if someone has the energy,
then please feel free to do so! Any further comments
are also welcome.
- Re: [Texmacs-dev] Finnish translation, (continued)
- Re: [Texmacs-dev] Finnish translation, Joris van der Hoeven, 2002/11/05
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/06
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/06
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/07
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/07
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/07
- [Texmacs-dev] texmacs colors, Amir Michail, 2002/11/07
- Re: [Texmacs-dev] texmacs colors, Joris van der Hoeven, 2002/11/08
- Re: [Texmacs-dev] texmacs colors, Stéphane Payrard, 2002/11/08
- Re: [Texmacs-dev] texmacs colors, Joris van der Hoeven, 2002/11/09
- Re: [Texmacs-dev] Translations,
Joris van der Hoeven <=
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/07
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/07
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/08
- Re: [Texmacs-dev] Translations, David Allouche, 2002/11/08
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/08
- Re: [Texmacs-dev] Translations, Teemu Ikonen, 2002/11/06
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/06
- Re: [Texmacs-dev] Translations, Teemu Ikonen, 2002/11/08
- Re: [Texmacs-dev] Translations, Joris van der Hoeven, 2002/11/09
- Re: [Texmacs-dev] Translations, Teemu Ikonen, 2002/11/11