ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* multi language (with module)
@ 2012-05-16 12:17 Peter Schorsch
  2012-05-16 12:28 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Schorsch @ 2012-05-16 12:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

to finish my first module I like to make it also available for
non-german users (remove the hardcoded german text). But I could not
figure out how in a way that works. So I wrote down a minimal example
in pseudo-tex to point out my goal. Can you give me an idea/solution
how to implement it in a correct way?

Thanks,
P.

--8<------t-welcome.tex------------
\startmodule[welcome]
\unprotect

\setupmodule[atPageText=]

%these two lines are properly totally wrong but should show the idea
\define[atPageText[en]={Welcome}]
\define[atPageText[de]={Willkommen}]

\def\welcome{\moduleparameter{welcome}{atPageText}}

\protect
\stopmodule
\endinput

--8<-------welcome.tex---------------
%this line is properly totally wrong but should show the idea
\usemodule[welcome][atPageText[eo]={Bonvenon},atPageText[de]={Guten
Tag}]]

\starttext

\language[en]
Should be Welcome: \welcome

\language[de]
Should be Guten Tag: \welcome

\language[eo]
Should be Bonvenon: \welcome

\stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-16 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 12:17 multi language (with module) Peter Schorsch
2012-05-16 12:28 ` Wolfgang Schuster
2012-05-16 13:42   ` Peter Schorsch
2012-05-16 14:24     ` Esperanto (was: multi language (with module)) Wolfgang Schuster

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).