Am 01.06.2011 um 09:45 schrieb Jeong Dalyoung:

> I summerize it as a test file. The first 5 methods are working well, but the 
> last one using \noexpand cause the error.

What exactly do you plan to do with the language check, for simple texts your 
method is overkill and labeltexts are better suited, even a command which 
prints a text can be written in TeX without problems:

\def\LangOne
  {\doifelse{\currentmainlanguage}{en}
     {English 1}
     {\doifelse{\currentmainlanguage}{nl}
        {Dutch 1}
        {Unknown 1}}}

\def\LangTwo
  {\processaction
     [\currentmainlanguage]
     [     en=>English 2,
               nl=>Dutch 2,
      unknown=>Unknown 2]}

\setuplabeltext[en][langthree=English 3]
\setuplabeltext[nl][langthree=Dutch 3]
\setuplabeltext    [langthree=Unknown 3]

\starttext

\LangOne:\LangTwo:\labeltext{langthree}:\translate[en=English 4,nl=Dutch 4]

\mainlanguage[nl]

\LangOne:\LangTwo:\labeltext{langthree}:\translate[en=English 4,nl=Dutch 4]

\mainlanguage[fr]

\LangOne:\LangTwo:\labeltext{langthree}:\translate[en=English 4,nl=Dutch 4]

\stoptext

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to