The issue here was that I wrongly assumed that the locale would always be available. Instead just use our built-in function to add thousands-separators (which I didn't find last time). Pull Request: https://projects.blender.org/blender/blender/pulls/147515