[NTG-context] Database of translations (was: Simple question)

Marco Patzer lists at homerow.info
Tue May 10 09:16:14 CEST 2022

On Tue, 10 May 2022 00:15:30 +0200
Gerben Wierda via ntg-context <ntg-context at ntg.nl> wrote:

> What is the easiest way to have a ‘database’ of translations for
> strings and maybe links?

Here's an idea:

\usemodule [translate]

%% \mainlanguage [nl]

\assigntranslation [en=alpha, nl=beta]\to\TRfoo
\translateinput [foo] [\TRfoo]

\assigntranslation [en=gamma, nl=delta]\to\TRbar
\translateinput [bar] [\TRbar]


  foo bar

It's not a good solution, but it's a start. There's also

  \translate [en=foo, nl=bar]

But I don't know how to combine it with \translateinput. That would
remove the need of the \TR… macros.


More information about the ntg-context mailing list