Originally Posted by Vladinator
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
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.