Thanks for your help.
At least, I found a solution for MacOS X :
the following commands
put replaceText(shell("defaults read NSGlobalDomain NSDecimalSeparator"),"(\s|\(|\))","")
put replaceText(shell("defaults read NSGlobalDomain NSThousandsSeparator"),"(\s|\(|\))","")
respectively give the decimal and thousand separator setup by the user in the control panel
Also
put replaceText(shell("defaults read NSGlobalDomain NSCurrencySymbol"),"(\s|\(|\))","")
give the currency symbol
Actually, input the command "defaults read NSGlobalDomain" in the Terminal list many of the user's preferences.
I will try to find a solution on W2K later.
Regards. Thierry.
On Sunday, Dec 14, 2003, at 15:02 Europe/Paris, Rob Cozens wrote:
I'm working on the problem to know the decimal separator defined in the system, on MacOS X and W2K.
Hi Thierry,
While one can use "system date" syntax to find the date separator and order of the month, day, & year elements, I have found no way to determine the Control Panel settings for decimal & thousands separators and the currency symbol via Transcript.
Lacking "system numberFormat" syntax, I created my own solution: All number formatting handlers in Serendipity Library look for a numberEditMask property in the calling stack. If the property is empty, the Library displays a modal "Number Edit Mask" dialog stack to set it. From the dialog the user can enter a one-char thousands separator, a one-char decimal separator, a one to three char currency symbol, and instructions as to whether the currency symbol is prefixed or appended.
I don't particularly like the fact that the user must be prompted for number formatting preferences even when they are already known to the OS; but lacking a means of discovery via Transcript otherwise, what's a mother to do?
Adding system date/time functions was a step in the right direction for localization (except system time doesn't return any time separator other than ":", regardless of the system settings); however the job won't be completely finished until Transcript can also inform the developer what number format is in use on the currently-running system. Until that happens, I humbly offer Serendipity Library's number formatting support:
<http://www.oenolog.net/ftp/serendipity_downloader.htm>
--
Rob Cozens CCW, Serendipity Software Company http://www.oenolog.net/who.htm
"And I, which was two fooles, do so grow three; Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631) _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
