Number localisation

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

Number localisation

sebastianconcept@gmail.co
Hi guys,

so... ideas to do number localisation?

How do you guys deal with it?


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Number localisation

Boris Popov, DeepCove Labs (SNN)

In VisualWorks,

 

(Locale named: 'en') numberPolicy print: 1000.23 using: '#,##0.00' '1,000.23'

(Locale named: 'fr') numberPolicy print: 1000.23 using: '#,##0.00' '1 000,23'

(Locale named: 'es') numberPolicy print: 1000.23 using: '#,##0.00' '1.000,23'

 

self:  a NumberPrintPolicy

decimalPoint:  $, "16r002C"

groupingSize:  3

localeID:  #es

policy:  nil

thousandsSeparator:  $. "16r002E"

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Sebastian Sastre
Sent: 23 April 2011 19:15
To: Seaside - general discussion
Subject: [Seaside] Number localisation

 

Hi guys,

 

so... ideas to do number localisation?

 

How do you guys deal with it?

 

 

o/


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Number localisation

Boris Popov, DeepCove Labs (SNN)
If you're using per-session locales, that API becomes much simpler too, but wouldn't illustrate the example as nicely.

Sent from my iPhone

On 2011-04-23, at 19:23, "Boris Popov, DeepCove Labs" <[hidden email]> wrote:

In VisualWorks,

 

(Locale named: 'en') numberPolicy print: 1000.23 using: '#,##0.00' '1,000.23'

(Locale named: 'fr') numberPolicy print: 1000.23 using: '#,##0.00' '1 000,23'

(Locale named: 'es') numberPolicy print: 1000.23 using: '#,##0.00' '1.000,23'

 

self:  a NumberPrintPolicy

decimalPoint:  $, "16r002C"

groupingSize:  3

localeID:  #es

policy:  nil

thousandsSeparator:  $. "16r002E"

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Sebastian Sastre
Sent: 23 April 2011 19:15
To: Seaside - general discussion
Subject: [Seaside] Number localisation

 

Hi guys,

 

so... ideas to do number localisation?

 

How do you guys deal with it?

 

 

o/

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Number localisation

sebastianconcept@gmail.co
hum... yeah looks great in VW

Pharo?




On Apr 23, 2011, at 8:33 PM, Boris Popov, DeepCove Labs wrote:

If you're using per-session locales, that API becomes much simpler too, but wouldn't illustrate the example as nicely.

Sent from my iPhone

On 2011-04-23, at 19:23, "Boris Popov, DeepCove Labs" <[hidden email]> wrote:

In VisualWorks,

 

(Locale named: 'en') numberPolicy print: 1000.23 using: '#,##0.00' '1,000.23'

(Locale named: 'fr') numberPolicy print: 1000.23 using: '#,##0.00' '1 000,23'

(Locale named: 'es') numberPolicy print: 1000.23 using: '#,##0.00' '1.000,23'

 

self:  a NumberPrintPolicy

decimalPoint:  $, "16r002C"

groupingSize:  3

localeID:  #es

policy:  nil

thousandsSeparator:  $. "16r002E"

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Sebastian Sastre
Sent: 23 April 2011 19:15
To: Seaside - general discussion
Subject: [Seaside] Number localisation

 

Hi guys,

 

so... ideas to do number localisation?

 

How do you guys deal with it?

 

 

o/

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Number localisation

marten
In reply to this post by sebastianconcept@gmail.co
I've one for VASmalltalk:

    | aStream |

     aStream := WriteStream on: String new.
     (LCNumeric for: #('german' 'germany'))
      printNumber: 100.23 on: aStream.
     aStream contents inspect



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Number localisation

Philippe Marschall
In reply to this post by sebastianconcept@gmail.co
2011/4/24 Sebastian Sastre <[hidden email]>:
> hum... yeah looks great in VW
> Pharo?

Looks kinda bleak. AFAIK Lukas once tried to parse the Unicode XML but
I don't know whether that got anywhere. You can try using a 5.x Mac
VM, add the LocalePlugin, introduce a global lock, switch the image
locale, … but that's an ugly hack at best.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Number localisation

sebastianconcept@gmail.co
no use at all. I don't one one locale in a laptop.

I need *any* locale in a (linux) server

PS: maybe now not any as everything but at least the three we need most





On Apr 25, 2011, at 3:28 AM, Philippe Marschall wrote:

> 2011/4/24 Sebastian Sastre <[hidden email]>:
>> hum... yeah looks great in VW
>> Pharo?
>
> Looks kinda bleak. AFAIK Lukas once tried to parse the Unicode XML but
> I don't know whether that got anywhere. You can try using a 5.x Mac
> VM, add the LocalePlugin, introduce a global lock, switch the image
> locale, … but that's an ugly hack at best.
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Number localisation

Boris Popov, DeepCove Labs (SNN)
As Philippe says, CLDR is the way to go for new locale implementations
if you're going to tackle one.

-Boris

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Sebastian Sastre
Sent: 25 April 2011 08:44
To: Seaside - general discussion
Subject: Re: [Seaside] Number localisation

no use at all. I don't one one locale in a laptop.

I need *any* locale in a (linux) server

PS: maybe now not any as everything but at least the three we need most





On Apr 25, 2011, at 3:28 AM, Philippe Marschall wrote:

> 2011/4/24 Sebastian Sastre <[hidden email]>:
>> hum... yeah looks great in VW
>> Pharo?
>
> Looks kinda bleak. AFAIK Lukas once tried to parse the Unicode XML but

> I don't know whether that got anywhere. You can try using a 5.x Mac
> VM, add the LocalePlugin, introduce a global lock, switch the image
> locale, ... but that's an ugly hack at best.
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside