23 Dec
2010
23 Dec
'10
9:37 a.m.
Since y'all are playing with cld, here's my little question: how can I write me a language test? Here is what I've been playing with: \mainlanguage[fr] \starttext \startluacode function doit(s) if tex.language == 2 then context("ENGLISH: ") context.currentmainlanguage() context(s) else context("NOT ENGLISH:") context.currentmainlanguage() context(s) end end \stopluacode \define[1]\Test% {\ctxlua{doit("#1")}} \Test{French} \language[en] \Test{English} \stoptext But that doesn't seem quite right... Thomas