Forum Discussion

wolfgang2's avatar
wolfgang2
Frequent Visitor
1 year ago
Solved

ValueFormatter ignoring culture

I have an issue with valueFormatter where it ignores the specified culture and always defaults to "en-US": import { valueFormatter } from "powerbi-visuals-utils-formattingutils"; ... formatter ...
  • dm-p's avatar
    dm-p
    1 year ago

    If the separator/decimal symbols are right after making the changes, it's probably "working." Unfortunately, I'm not best placed to determine how far it goes for the units, as English is my first language. During testing, I have only really confirmed the units match what *I* might expect (although I have a rudimentary understanding of which separators are needed for various locales). It is known that there are some cases where, even if all locales are bundled, Power BI doesn't provide the correct locale to the visual host (e.g., Swiss German, or de-CH), but it does supply de-DE correctly.

     

    MS uses the Globalize library to handle localization in powerbi-visuals-utils-formatingutils, and from a cursory look, I think the unit handling is not culture-specific. If you want a definitive answer, your best bet would be to check directly with MS ([email protected]).

     

    All the best,

     

    Daniel