View Single Post
07-21-12, 05:35 PM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Vladinator View Post
For international release addons, keep in mind that "." is for US while in EU it's "," so US code where the char is hard-coded would only work properly on US locale. It's not about the game locale too, I think it's the computer region that decides, take a look at: SetEuropeanNumbers - not sure if there is a "get" version to figure out what the client is running.
DECIMAL_SEPERATOR and LARGE_NUMBER_SEPERATOR are defined in GlobalStrings.lua, misspelled variable names and all.

Also, for decimals, string.format("%.1fk", "32765") will return "32.7k" or "32,7k" depending on your locale. There is no digit grouping function built into Lua, though, so you'll have to write your own.

Originally Posted by Mikord View Post
For shortening and rounding the numbers, would you guys prefer the nearest thousand or nearest hundred?

For example, 32,765 becomes 33k (nearest thousand) or 32.8k (nearest hundred)?
I'd prefer 33k (or even 32k; accuracy is less important than brevity in this context) but as long as it's only one decimal place, either way is acceptable.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 07-21-12 at 06:46 PM.