[luatex] Localisation of Lua or LuaTeX

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Mar 1 18:06:53 CET 2012


Am 01.03.2012 15:54, schrieb Ralf Meyer:
> When I was trying out how to format the date in LuaTeX as advertised
> using os.setlocale and os.date, I still got the english date.  Actually,
> this is a Lua problem because when I run lua, I get the same result:
>
> Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

voss at shania:~/texte/dtk/dtk12-1> lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
 > print(os.date())
Thu Mar  1 18:04:12 2012
 > os.setlocale("de_DE.UTF-8","time")
 > print(os.date())
Do 01 Mär 2012 18:04:33 CET

SuSE Linux 12.1

However, I also do not understand, why Lua doesn't
take the current setting, which is already de_DE.UTF-8
into account.

Herbert


>> os.setlocale("de_DE")
>> print(os.date("Heute ist der \%A im Monat \%B."))
> Heute ist der Thursday im Monat March.
>> os.setlocale("de_DE","time")
>> print(os.date("Heute ist der \%A im Monat \%B."))
> Heute ist der Thursday im Monat March.
>
> What could be the reason for os.setlocale to have no effect?
>
> Yours,
> Ralf Meyer
>



More information about the luatex mailing list