[luatex] Localisation of Lua or LuaTeX

luigi scarso luigi.scarso at gmail.com
Thu Mar 1 16:07:22 CET 2012


On Thu, Mar 1, 2012 at 3:54 PM, Ralf Meyer <rameyer at uni-math.gwdg.de> wrote:

> 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
> > 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.
>
> res=os.setlocale("de_DE")
print(res)
Is res nil ?

(under linux)
What is your
$> locale -a
?
Mine said that it_IT.UTF-8 is a lvalide locale, so

$> lua
Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> res=os.setlocale('it_IT.UTF-8');print(res)
it_IT.UTF-8
>  print(os.date("Heute ist der \%A im Monat \%B."))
Heute ist der giovedì im Monat marzo.


-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20120301/e3439f73/attachment.html>


More information about the luatex mailing list