Setup Locale for Italy country

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setup Locale for Italy country

dario trussardi
Ciao,

        i work with Pharo4.0  Latest update: #40625

        Now i need to setup the system to manage the Italy country

                - decimalSymbol ( , )
                - currencySymbol ( € )

                -dateFormat dd-MM-yyyy  HH:mm

        How i can do it ?

        What is the Pharo system status about localization ?

        The:   Locale current answer  aLocale instance

                with id set to it-It

                but with all variables set to nil.

       
        Thanks for any considerations,

                Dario
Reply | Threaded
Open this post in threaded view
|

Re: Setup Locale for Italy country

Max Leske
Wow! Locale seems to be seriously broken: variables have not accessors, primitives have not senders...

It seems that the primitives can be used without problems to access the locale properties of the host OS but it seems that it’s not possible to switch the locale.


> On 08 Jan 2016, at 12:17, Trussardi Dario Romano <[hidden email]> wrote:
>
> Ciao,
>
> i work with Pharo4.0  Latest update: #40625
>
> Now i need to setup the system to manage the Italy country
>
> - decimalSymbol ( , )
> - currencySymbol ( € )
>
> -dateFormat dd-MM-yyyy  HH:mm
>
> How i can do it ?
>
> What is the Pharo system status about localization ?
>
> The:   Locale current answer  aLocale instance
>
> with id set to it-It
>
> but with all variables set to nil.
>
>
> Thanks for any considerations,
>
> Dario


Reply | Threaded
Open this post in threaded view
|

Re: Setup Locale for Italy country

Sven Van Caekenberghe-2
But even so, there is totally no provision in the image to magically change for example date formatting or parsing based on (one global default) locale, let alone the decimal or thousands separators. One could even argue whether that would be a good idea or not.

The alternative would be for you to use the appropriate formatters/parsers where you produce/consume user visible text. There are certainly provisions for doing that, as well as several external frameworks that can help.
 

> On 08 Jan 2016, at 15:39, Max Leske <[hidden email]> wrote:
>
> Wow! Locale seems to be seriously broken: variables have not accessors, primitives have not senders...
>
> It seems that the primitives can be used without problems to access the locale properties of the host OS but it seems that it’s not possible to switch the locale.
>
>
>> On 08 Jan 2016, at 12:17, Trussardi Dario Romano <[hidden email]> wrote:
>>
>> Ciao,
>>
>> i work with Pharo4.0  Latest update: #40625
>>
>> Now i need to setup the system to manage the Italy country
>>
>> - decimalSymbol ( , )
>> - currencySymbol ( € )
>>
>> -dateFormat dd-MM-yyyy  HH:mm
>>
>> How i can do it ?
>>
>> What is the Pharo system status about localization ?
>>
>> The:   Locale current answer  aLocale instance
>>
>> with id set to it-It
>>
>> but with all variables set to nil.
>>
>>
>> Thanks for any considerations,
>>
>> Dario
>
>