The number format in Swiss German is like "100'000.00" (not "100,000.00"). How can I change that? I tried to change the settings in number_pipe.js from en-US to de-CH without success.
var defaultLocale: string = 'de-CH';
Is there a workaround or do I have to implement my own pipe?
Angular uses the Unicode locale identifier (Unicode locale ID) to find the correct locale data for internationalization of text strings. Unicode locale ID. A locale ID conforms to the Unicode Common Locale Data Repository (CLDR) core specification.
Default is 0. maxFractionDigits : The maximum number of digits after the decimal point. Default is 3.
The DecimalPipe is used to format a value/ number as per the required decimal digits and locale information. The name of the pipe is number.
If you only need one locale for your app, you can as of now (@angular ~2.4.0) register the locale provider in @NgModule.
@NgModule({
...
providers: [
{provide: LOCALE_ID, useValue: "de-CH"}
]
})
export class AppModule {}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With