On Thu, 11 Feb 2010 04:00:21 -0800 (PST) beginners-request@lists.squeakfoundation.org wrote:
From: Van Upboy van.upboy@gmail.com Subject: [Newbies] seaside sushi cart internationalization To: beginners@lists.squeakfoundation.org Message-ID: 18d121371002101317s78d44458r5c46e913f862f626@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
Hi all,
I'm playing with the sushi cart of seaside. I'm trying to create a Dutch version of it. That's simply looking up text and replacing it.
Hmm, at least that's what I thought.
Because then I've come across the printStringAsCents method to show the price (for instance $ 1.50 ).
As I live in Europe, I don't want to use $, but Euro's. Of course, if someone gives them to me, I won't say no to a few dollars ;-)
It seems to be here: Kernel-Numbers / Integer printStringAsCents method, which is: ^ '$', (self // 100) displayString, '.', (self \ 100) asTwoCharacterString
1a. Should I replace the $ sign here? Can I put the Euro sign here?
But I don't like changing kernel methods:
- it seems dangerous because I don't know what depends on it
- hard to transfer to other installations
- and it is very likely that I will forget that I changed it for the
sushi cart because the code is 'hidden' somewhere else.
Besides that, I would like to be able to set the kind of currency.
It might be easier/safer to load the Money package on http://www.squeaksource.com/Money.html and make the prices in the sushi store Money objects. You could then convert them among many currencies.
beginners@lists.squeakfoundation.org