How would I format/shorten numbers without LocalizationServices?

How would I format numbers like 1000 to 1,000 and shortening to 1,234,567 to 1.2M without using arrays of CLDR datas or LocalizationServices?

  • LocalizationnService’s tool don’t support shortening numbers (and format 1000 as 1.000 instead of the correct 1000 in Spanish, and 1000 as 1 000 instead of correct 1.000 in de_DE locale).
  • Unicode CLDR takes too much space for this use case, and I don’t need anything else other than formatting numbers so it’s an overkill.

How would I format numbers, something like JS’s ToLocaleString?
Do Roblox support something like this?