View Single Post
05/30/23, 08:59 AM   #13
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 181
Note: there's an expectation with ZO_CommaDelimitNumber and ZO_CommaDelimitDecimalNumber that the result would at some point make its way into a grammar call in an arg of the format <<f:1>>, because grammar will automatically convert the , and . to the appropriate delimiter for the user's language (some languages swap the . and the , from what English uses. French, I believe, uses hardspaces.) ZO_FastFormatDecimalNumber uses already localized delimiters so you can skip the call to grammar.

All that to say make sure you know whether the string you're working with is before or after being localized. Because if it's after, just using gsub to replace ',' with '' will replace the decimal, not the thousands separators, in some languages. If it's after localization, consider using GetString(SI_DIGIT_GROUP_SEPARATOR) for your gsub.
  Reply With Quote