We are building a Global FinTech Dashboard for an enterprise client. The system generates invoices that are viewed by users in different countries.
While the immediate requirement is to add comma separators for thousands in the US format, we need a solution that is robust and scalable. It must handle negative balances, extremely large numbers without losing precision, and decimals. Most importantly, as a Staff Engineer, how would you implement this while keeping future internationalization—where some countries use periods as thousands separators—in mind?