From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114900 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerben Wierda via ntg-context Newsgroups: gmane.comp.tex.context Subject: Simple question Date: Tue, 10 May 2022 00:15:30 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Content-Type: multipart/mixed; boundary="===============9161215462196467619==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerben Wierda To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue May 10 00:25:58 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noBpG-0007w7-36 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 10 May 2022 00:25:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 223843606C2; Tue, 10 May 2022 00:25:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zxfL8RyFMLcc; Tue, 10 May 2022 00:25:13 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 59EC036071F; Tue, 10 May 2022 00:25:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2B8E936071F for ; Tue, 10 May 2022 00:25:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4BfBoDCBWj2F for ; Tue, 10 May 2022 00:25:11 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= X-Greylist: delayed 575 seconds by postgrey-1.36 at zapf.ntg.nl; Tue, 10 May 2022 00:25:10 CEST Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id EC78E3606C2 for ; Tue, 10 May 2022 00:25:10 +0200 (CEST) Original-Received: from smtpclient.apple (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id E6AC6D65A6AB for ; Tue, 10 May 2022 00:15:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1652134530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3l/j6p7DXdZDzVU70okKp1Nl2vdy0az2B3WNsJvXqFM=; b=fsj1L1QA6uG3MsFAhCQvH7Q0PpgxXhRpAFcdSb50EsR4thrg3q2j8876W2u9zZFgCj0h82 9FoMsyGmlX4l2qDY4ssuysIztHc6TLf5bnv9jsluMFFis68abcjh/tWzIlKrFxeDW1En7n fWPPC64ben3FUkTcRrVyiHV7iwQI9A5emzyoGFgoI9A7+XeomCGBUOlxJQFgPm+KCkxLkA elwDdlLyy0Q81eJWkBlpnsnY4BrSxKbjJcYZ5h2z6C7Bv84Am2qcQz5Lbo9GQUfIb+sZH3 trDR5a6kA3Wb2JHwdibhglTUzG3u7Jp2vrFzaMlw4lCDun4JQ7BoDpCdoBHoHA== X-Mailer: Apple Mail (2.3693.60.0.1.1) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:114900 Archived-At: --===============9161215462196467619== Content-Type: multipart/alternative; boundary="Apple-Mail=_38990068-1037-475E-9E4E-BE4EBC114D90" --Apple-Mail=_38990068-1037-475E-9E4E-BE4EBC114D90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 What is the easiest way to have a =E2=80=98database=E2=80=99 of = translations for strings and maybe links? I now have 4 languages and 2 versions so 8 documents, but I=E2=80=99d = like to have all translatable strings together so I can maintain these = in a single file. Ideally I can do a file where the key of the = translation is one language (say English) and the translations are part = of that.=20 Something I can call like this \translatephrase[English phrase][nl] \translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple] and where I can maintain all the translations a bit like this: \translationentry[English phrase]{ \definetranslatephrase[nl]Nederlandse frase] \definetranslatephrase[fr][Phrase fran=C3=A7ais] } } = \translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../= LMTX-Output/without-ids/nl/file-simple.pdf]] = \translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LM= TX-Output/without-ids/nl/file.pdf]] Where the \translatelocation command can be used inside an = \externalfigure command and \translatephrase can be used as as text. In the end I=E2=80=99d like to compile with=20 context language=3Dfr mode=3Dsimple mainfile.tex Doable? Gerben Wierda (LinkedIn ) R&A IT Strategy (main site) Book: Chess and the Art of Enterprise=C2=A0Architecture = Book: Mastering ArchiMate --Apple-Mail=_38990068-1037-475E-9E4E-BE4EBC114D90 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 What = is the easiest way to have a =E2=80=98database=E2=80=99 of translations = for strings and maybe links?

I now have 4 languages and 2 versions so 8 documents, but = I=E2=80=99d like to have all translatable strings together so I can = maintain these in a single file. Ideally I can do a file where the key = of the translation is one language (say English) and the translations = are part of that. 

Something I can call like this

\translatephrase[English = phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][= simple]

and = where I can maintain all the translations a bit like this:

\translationentry[English = phrase]{
= \definetranslatephrase[nl]Nederlandse frase]
= \definetranslatephrase[fr][Phrase fran=C3=A7ais]
= }
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simp= le][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none= ][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an = \externalfigure command and \translatephrase can be used as as = text.

In the = end I=E2=80=99d like to compile with 

context language=3Dfr mode=3Dsimple = mainfile.tex

Doable?
= --Apple-Mail=_38990068-1037-475E-9E4E-BE4EBC114D90-- --===============9161215462196467619== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============9161215462196467619==--