[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Internationalization of Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 29 Nov 2016 09:45:09 -0200
> You need to set the locale inside Lua:
>
> % lua
> Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> > os.setlocale"fr_FR"
> fr_FR
> > "3,14" + 1
> 4,14
os.setlocale("") is a better solution because it reads the locale from
the environment:
env LC_NUMERIC="fr_FR.UTF-8" lua
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> os.setlocale("")
en_US.ISO8859-1/en_US.ISO8859-1/en_US.ISO8859-1/fr_FR.UTF-8/en_US.ISO8859-1/en_US.ISO8859-1
> "3,14" + 1
4,14
- References:
- Re: Internationalization of Lua, Gregg Reynolds
- Re: Internationalization of Lua, Sean Conner
- Re: Internationalization of Lua, Dirk Laurie
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, mathieu stumpf guntz
- Re: Internationalization of Lua, Luiz Henrique de Figueiredo