From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68830 Path: news.gmane.org!not-for-mail From: Jeong Dalyoung Newsgroups: gmane.comp.tex.context Subject: Re: checking mainlanguage setup Date: Wed, 01 Jun 2011 16:45:37 +0900 Message-ID: <03D02E6E-2F85-442E-ABE8-FB63D8BC1614@me.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1306914384 31202 80.91.229.12 (1 Jun 2011 07:46:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2011 07:46:24 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 01 09:46:18 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRg8A-00020a-5z for gctc-ntg-context-518@m.gmane.org; Wed, 01 Jun 2011 09:46:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 089CCCAD41; Wed, 1 Jun 2011 09:46:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id B3WiK2BhE3lm; Wed, 1 Jun 2011 09:46:14 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5ACEDCAD3C; Wed, 1 Jun 2011 09:46:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5CA13CAD3C for ; Wed, 1 Jun 2011 09:46:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SIEs++CUyYTc for ; Wed, 1 Jun 2011 09:46:01 +0200 (CEST) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 76BB0CAD38 for ; Wed, 1 Jun 2011 09:46:01 +0200 (CEST) Original-Received: from asmtpout021.mac.com (asmtpout021.mac.com [17.148.16.96]) by filter2-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p5177k2E010446 for ; Wed, 1 Jun 2011 09:07:47 +0200 Original-Received: from [211.59.105.64] by asmtp021.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LM300IEBPK1JC60@asmtp021.mac.com> for ntg-context@ntg.nl; Wed, 01 Jun 2011 00:45:40 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-06-01_03:2011-06-01, 2011-06-01, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1106010004 In-reply-to: X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=17.148.16.96; country=US; region=CA; city=Cupertino; postalcode=95014; latitude=37.3042; longitude=-122.0946; metrocode=807; areacode=408; http://maps.google.com/maps?q=37.3042,-122.0946&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0aEOv7LWA - f14aba84b217 - 20110601 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:68830 Archived-At: Dear Aditya, > > context([[\def\noexpand\Lang{...}]]) not working > > or > > context([[\def\string\Lang{...}]]) working > > I don't understand why > > context([[\def\\Lang{...}]]) working, too You are right. [[\def\\Lang{English}]] method works. I summerize it as a test file. The first 5 methods are working well, but the last one using \noexpand cause the error. Thank you. Best regards, Dalyoung \mainlanguage[en] \starttext \startitemize[n] \head Using \type{context.setvalue("Lang","English")} \startluacode if languages.current() == "en" then context.setvalue("Lang","English") else context.setvalue("Lang","Not English") end \stopluacode Current language: \Lang \head Using \type{context("\\def\\Lang{English}")} \startluacode if languages.current() == "en" then context("\\def\\Lang{English}") else context("\\def\\Lang{Not English}") end \stopluacode Current language: \Lang \head Using \type{context([[\def\string\Lang{English}]])} \startluacode if languages.current() == "en" then context([[\def\string\Lang{English}]]) else context([[\def\string\Lang{Not English}]]) end \stopluacode Current language: \Lang \head Using \type{context([[\def\\Lang{English}]])} \startluacode if languages.current() == "en" then context([[\def\\Lang{English}]]) else context([[\def\\Lang{Not English}]]) end \stopluacode Current language: \Lang \head Using \type{\doifelse\currentmainlanguage{en}...} \doifelse\currentmainlanguage{en} {\def\Lang{English}}{\def\Lang{Not English}} Current language: \Lang \head Using \type{context([[\def\noexpand\Lang{English}]])} %\startluacode % if languages.current() == "en" then % context([[\def\noexpand\Lang{English}]]) % else % context([[\def\noexpand\Lang{Not English}]]) % end %\stopluacode %Current language: \Lang \stopitemize \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 ___________________________________________________________________________________