Quantcast WoWInterface - View Single Post - MikScrollingBattleText 5.7 for MoP
View Single Post
07-21-12, 05:35 PM   #12
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,603
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.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

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