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. 1b. Is there multilingual (regarding currencies / display of date and time / use of an external file with string messages that can be translated instead of hard coded text) library somewhere out there? 2. Because of all the help, I know how to find classes, which is great. But in my search for the printStringAsCents I was wondering how do I find messages when I know the message name, but not the class name? Or is it easy to determine the class name in some way? Any thoughts are appreciated. _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hi Van,
VU> 2. Because of all the help, I know how to find classes, which VU> is great.But in my search for the printStringAsCents I was VU> wondering how do Ifind messages when I know the message name, but VU> not the class name? Oris it easy to determine the class name in VU> some way? in the right tools flap you find a "message names" and a "method finder" tool. Message names is your friend here but also read the text in method finder. In general, highlight the name of a method anywhere (Workspace, browser, inspector) and shift right click. There you find implementors (which classes implement it), senders (where and how is it used) "selecors containing it" (seek for a method where you only know part of the name) "method strings with it" (to find literals in methods) and "method source with it" (slow full text search). Smalltalk is a lot about tools :-)) Cheers, Herbert _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Van Upboy
On Thu, 11 Feb 2010 04:00:21 -0800 (PST)
[hidden email] wrote: > From: Van Upboy <[hidden email]> > Subject: [Newbies] seaside sushi cart internationalization > To: [hidden email] > Message-ID: > <[hidden email]> > 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 mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |