From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63913 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Ctx & Lua: determination of the language being used Date: Thu, 25 Nov 2010 13:13:04 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1290687216 12593 80.91.229.12 (25 Nov 2010 12:13:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Nov 2010 12:13:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 25 13:13:30 2010 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 1PLahe-0004eP-9l for gctc-ntg-context-518@m.gmane.org; Thu, 25 Nov 2010 13:13:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 778E8CA883; Thu, 25 Nov 2010 13:13:27 +0100 (CET) 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 VRKch3gvbSCw; Thu, 25 Nov 2010 13:13:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ECEE0CA87E; Thu, 25 Nov 2010 13:13:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 09B98CA87E for ; Thu, 25 Nov 2010 13:13:22 +0100 (CET) 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 7t-0B9IPl9sr for ; Thu, 25 Nov 2010 13:13:10 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 7B547CA87D for ; Thu, 25 Nov 2010 13:13:10 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAPCD9Ct010179 for ; Thu, 25 Nov 2010 13:13:10 +0100 Original-Received: by fxm20 with SMTP id 20so724365fxm.14 for ; Thu, 25 Nov 2010 04:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=xwBEjMQOWDHspUgPhuX+CcOkmLAvlFvlmIXzY6YX4Q0=; b=nEP/RnVmEm65pABW5Z3yYW3NMR0+3XZ95LKlmV5GNGCmj6oCc5xseRssdvNpd+QkG+ X6U+H2ESTQ4ABDMmUG7mvwZEUbtB/lrhcoq2jtn9DwI8HS1jKvx5oJ4QV0JCHeZEHRVP nBdf5m+LIq1+hcn2uc2PTyu29zMIzzNK4wH48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=puz0WwR4VAMQUmwiUE6ro+Bf1yBNeqPguJOgjOpkka1ZXS3roXPTwEY4ozaxqxd1mX CKzs1yryLSgxmEkB0Ujg3e3ZRsPrSN4r056NpUy3iiMx19U8035Qy2jyElRjZyv6/sRi zuSN4LWHuMnyQpNeUr+0WGMBBKSmEIRUr2E8Q= Original-Received: by 10.223.96.198 with SMTP id i6mr671687fan.10.1290687189444; Thu, 25 Nov 2010 04:13:09 -0800 (PST) Original-Received: from [192.168.2.23] (p5B29340B.dip.t-dialin.net [91.41.52.11]) by mx.google.com with ESMTPS id e17sm166896fak.34.2010.11.25.04.13.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Nov 2010 04:13:08 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDzod9PS - c1cfd0f7d82b - 20101125 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:63913 Archived-At: Am 25.11.2010 um 12:49 schrieb Proch=E1zka Luk=E1=9A Ing. - Pontex s. r. o.: > Hello, > = > how to determine the current language being used in Ctx source via Lua? I= mean soumething like: > = > --- > \mainlanguage[cz] > = > \starttext > AAA > = > \startluacode > if context.mainlanguage =3D=3D "cz" then -- Do something specific > context("Ahoj!") > elseif context.mainlanguage =3D=3D "en" then -- Do something specific > context("Hello!") > else > end > \stopluacode > \stoptext > --- > = > So is there something like 'context.mainlanguage' or 'context.mainlanguag= e()' or 'tex.mainlanguage' or ...? \mainlanguage[...] -> \currentmainlanguage \language[...] -> \currentlanguage Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________