[Pharo-project] new Cog VMs uploaded

Henrik Sperre Johansen henrik.s.johansen at veloxit.no
Wed Apr 27 20:43:06 CEST 2011

On 27.04.2011 20:35, Henrik Sperre Johansen wrote:
> Also note, primShortDateFormat does nothing with the Locale you specify.
> All the primitives return values for the current process locale. (Set at
> startup to system locale rather than C)
> You'd need to forcibly change the process locale with primSetLocale from
> ImmX11Plugin (which isn't available in the image, thank God), and hope your
> linux has that locale installed
> (Ubuntu f.ex. only comes with a single one installed by default, and
> switching to anything but that or C will fail)
> Can't use primGetLocale (not accessible from image either :D ) to check if
> it's been successful though, as that resets the locale to system locale :)
> TLDR; What you want to do is impossible with the current implementation.
> Correcting it is really a waste of time, as something which works correct
> would be shabby at best.
> Implementing use of CLDR data is the way to go if you want something that is
> both reliable and works.
> The only bits the Locale plugin is good at (should be used for), is getting
> the system defined country/language.
> Cheers,
> Henry
Oh wait, I forgot.
LocalePlugin caches the values for the current locale at startup, so it 
wouldn't work changing it later anyways.

Sorry for the noise (except the TLDR part).


More information about the Pharo-project mailing list