Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s7PJoCuh021948 for ; Mon, 25 Aug 2014 21:50:13 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx110) with ESMTPS (Nemesis) id 0MNush-1XEZE405T1-007SgX for ; Mon, 25 Aug 2014 21:50:07 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s7PJlYjf030711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Aug 2014 21:47:34 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s7PGxR8M031544; Mon, 25 Aug 2014 21:47:33 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11302289 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 25 Aug 2014 21:47:33 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s7PJlXkg000482 for ; Mon, 25 Aug 2014 21:47:33 +0200 Received: from mail-in-16.arcor-online.net (mail-in-16.arcor-online.net [151.189.21.56]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s7PJlSbK018151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 25 Aug 2014 21:47:29 +0200 Received: from mail-in-14-z2.arcor-online.net (mail-in-14-z2.arcor-online.net [151.189.8.31]) by mx.arcor.de (Postfix) with ESMTP id 97D098386 for ; Mon, 25 Aug 2014 21:47:28 +0200 (CEST) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-14-z2.arcor-online.net (Postfix) with ESMTP id 9337718BD6 for ; Mon, 25 Aug 2014 21:47:28 +0200 (CEST) X-Greylist: Passed host: 92.78.45.152 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net 65DC59BE39 Received: from [192.168.2.125] (dslb-092-078-045-152.092.078.pools.vodafone-ip.de [92.78.45.152]) (Authenticated sender: mailing_list@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTPA id 65DC59BE39 for ; Mon, 25 Aug 2014 21:47:28 +0200 (CEST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 References: <53F648E6.8020107@arcor.de> <53F75351.2080503@tex-tipografia.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <53FB92D0.9040007@arcor.de> Date: Mon, 25 Aug 2014 21:47:28 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Stephan Hennig Subject: Re: iterating over all languages To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <53F75351.2080503@tex-tipografia.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:wfC0XyC3V3k=:63Bx9O2q4Vhf3bBPBz9vfDSGk7 NAX5Lf805hqTJD0auvJAAy179w1N7vQxKJ2b7fHEoiEO2L3g9UPeccXvYy+k+tzYWlcpFKJ2x rMFZC47QknbYFcYza0dl40LI2gKk5aypO7KRzWv+cC9pYlOJsgdg2PuwWTLLBM/9mRl5rgqJ5 VjUfNGtGBdqRjIATG+HbfNN+cW4JTOCSEecYSO+ZjmbKpYy8K2hYnrgsd6JMB5mk3i0K7n9RP SZ/EpDz/P7eMxgcXXnBNtcweEspvUE60xHQS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PNJM95AgCLarupLR7zDvbg/fq4fCZccqVPJ0nuEI9/jhWF3A3S+P82jN x7vgVsMAJUjQT0QekPibx/fvcK5CRJVDskYlhEXmP7zuW3MyyNlqEvOkqtmryWwl34QKG0pJJ d/Ka/ZycARZtPB4tQMJXxkBO4ruySMyxxvBudNa0Ksh5DXGDIRLNn9oEuNdhhF6RTs1Tbxpw= = X-UI-Loop:V01:PLNT03+ScTw=:0LKsHy+pOORWA1PqF1XbzuptWO4Xr/xjFUTNYWurOSE= X-UI-Out-Filterresults: notjunk:1; Status: R X-Status: X-Keywords: X-UID: 7576 Am 22.08.2014 um 16:27 schrieb Javier Bezos: > \documentclass{article} > \usepackage[german]{babel} > \begin{document} > \makeatletter > \def\bbl@elt#1#2#3#4{// #1 - #2 - #3 - #4} > \message{\bbl@languages} > \makeatother > \end{document} Thanks! Here's what I've come up with to convert Babel language identifiers to numbers in Lua. Best regards, Stephan Hennig \documentclass{article} \usepackage[german]{babel} \begin{document} \makeatletter \begingroup \def\bbl@elt#1#2#3#4{/#1/#2/#3/#4/} \directlua{ % Global table translating language strings to numbers. language_num = {} local languages = '\luatexluaescapestring{\bbl@languages}' for language, num, pattern, ex in unicode.utf8.gmatch(languages, '/(.-)/(.-)/(.-)/(.-)/') do language_num[language] = tonumber(num) texio.write_nl(language .. ' = ' .. num) end } \endgroup \makeatother \directlua{ local function lang2num(l) local n = language_num[l] or 'unknown' texio.write_nl('[lang2num] ' .. l .. ' = ' .. n) end lang2num('english') lang2num('german') lang2num('finish') lang2num('finnish') } \end{document}