ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco Patzer <lists@homerow.info>
Subject: Database of translations (was: Simple question)
Date: Tue, 10 May 2022 09:16:14 +0200	[thread overview]
Message-ID: <20220510091614.33c61b7a@homerow> (raw)
In-Reply-To: <C19B2BDB-40A3-4B46-91F4-FF1D66E0230F@rna.nl>

On Tue, 10 May 2022 00:15:30 +0200
Gerben Wierda via ntg-context <ntg-context@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]

\enableinputtranslation

\starttext
  foo bar
\stoptext

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.

Marco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2022-05-10  7:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 22:15 Simple question Gerben Wierda via ntg-context
2022-05-10  7:10 ` Henning Hraban Ramm via ntg-context
2022-05-10  7:16 ` Marco Patzer via ntg-context [this message]
2022-05-10 15:21 ` Wolfgang Schuster via ntg-context
2022-05-10 16:47   ` Gerben Wierda via ntg-context
2022-05-10 18:05     ` Denis Maier via ntg-context

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=20220510091614.33c61b7a@homerow \
    --to=ntg-context@ntg.nl \
    --cc=lists@homerow.info \
    /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).