On Thu, 25 Nov 2010 14:22:18 +0100, Taco Hoekwater
On 11/25/2010 02:16 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
No, nothing as complicated as that: \currentmainlanguage is an expandable macro, so it simply expands to its actual content: cs
This also means that my proposed solution will not work if you put it in a separate lua file: you have to convert it to a lua function in that case that takes \currentmainlanguage as an argument.
... And using this in a separate file is also what I'd need. So do I have to do something like: --- A.mkiv \startluacode function currentmainlanguage() return "\currentmainlanguage" end -- Or: the_currentmainlanguage = "\currentmainlanguage" dofile("A.lua") \stopluacode --- And: --- A.lua if currentmainlanguage() == "cs" then -- Or: if the_currentmainlanguage = "cs" then -- Something end --- OK? (Suggestion: Wouldn't be nice to have function(s) or variable(s) like e.g. 'context.environment["currentmainlanguage"]' or something like this?) Best regards, Lukas (To Taco: Sorry, I sent the same message to your private address first.)