10.5: Set custom number and currency formats
Apr 09, '08 07:30:05AM
Contributed by: oPossumi
You can set custom number and currency formats using the defaults system. For example, entering the following code in Terminal sets the thousands separator to a space, and the decimal separator to a comma, leaving the currency symbol as set in International preference pane:
defaults write -g AppleICUNumberSymbols -dict 0 ',' 1 ' ' 10 ',' 17 ' '
Some useful keys for the AppleICUNumberSymbols:
- 0 -- decimal separator for numbers
- 1 -- thousands separator for numbers
- 4 -- starting character for numbers; for example, if you set the value to a, instead of numbers 0-9 you will see characters a-j (well, this is not that useful!).
- 8 -- currency symbol; don't set this to honor the settings in the International preference pane
- 10 -- decimal separator for currency
- 17 -- thousands separator for currency
[robg adds: This worked as described, and seems to be the only way to customize the number formats -- the International System Preferences panel includes a Customize button for Dates and Times, but not for Numbers. I don't know if this only works in 10.5, but the hint was submitted that way, so I've left it marked as such.]
Comments (14)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080403055310704