Skip to content

Currency pipe is not working in compliance with the localization settings. #16591

@frontconnect

Description

@frontconnect

I'm submitting a bug report.

Current behavior

USD 12,30

Expected behavior

I configure the LOCALE_ID provider to the Dutch language on the app module level.
My purpose it to use the currency pipe and have the number text converted to this:

€ 12,30

As mentioned on the documentation for the currency pipe, I expect
to see the currency sign rather than the currency code.

Minimal reproduction of the problem with instructions

I configure the localization at the app module level.

@NgModule({
  imports: [ BrowserModule ],
  declarations: [ AppComponent ],
  providers: [
    { provide: LOCALE_ID, useValue: 'nl' }
  ],
  bootstrap:    [ AppComponent ]
})

export class AppModule { }

I'm using the currency pipe on my component.

@Component({
  selector: 'my-app',
  template: '<h1>{{title}}</h1>' +
            '<div>{{convertNumber | currency}}</div>',
})

export class AppComponent {
   title = 'Currency Pipe Test';
   convertNumber = '12.30';
}

For the working example, please check this plnkr link.

What is the motivation / use case for changing the behavior?

Apparently, the localization file for Dutch language is wrong. I can't find the
location of this localization file. If I can, I would like to fix it.

Please tell us about your environment:

  • Angular version: 4.0.X

  • Browser: [all ]

  • Language: [all |TypeScript ]

  • Node (for AoT issues): `
    v6.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions