This is a migrated thread and some comments may be shown as answers.

Change currency symbol without changing the locale

5 Answers 1100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arthur
Top achievements
Rank 1
Veteran
Arthur asked on 18 Sep 2020, 01:35 PM

I would like to change the currency symbol globally, not per pipe/function or component.

So in my case I want to display amounts in "€", but the application's locale should be the default one (en-US).

I did not found anything in the documentation, any ideas?

5 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 22 Sep 2020, 07:58 AM

Hello Arthur,

Though the question is not related to KendoAngular components, would suggest to use some kind of Singleton service , which will hold the value of currency ( which is global for the app ) and will be updated according to user preferences. This value can be then used in UI with some kind of directive or component that will take care for updating and displaying it.

I hope this will help you.

Regards,
Ivan
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Arthur
Top achievements
Rank 1
Veteran
answered on 22 Sep 2020, 08:28 AM

Hello Ivan,

is the currency symbol tied to the locale, so I can only change the locale globally or provide the currency symbol in the pipes via the format option?

 

0
Ivan
Telerik team
answered on 24 Sep 2020, 07:50 AM

Hi Arthur,

It is not out of the box solution , but you can do something like in this stackblizt sample.  There is other more robust way, which involves defining new locale and using it as variant of your locale. We will consolut with the core team for this implementation and will follow you back.

Regards,
Ivan
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Accepted
Ivan
Telerik team
answered on 24 Sep 2020, 07:56 AM

Hello Arthur,

Just to follow you up with other way to achieve the desired behaviour, just use

intlService.formatNumber(number, customCurrencyOptions)

like in this stackblitz sample.

Regards,
Ivan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Arthur
Top achievements
Rank 1
Veteran
answered on 16 Oct 2020, 08:10 AM
Thanks
Tags
General Discussions
Asked by
Arthur
Top achievements
Rank 1
Veteran
Answers by
Ivan
Telerik team
Arthur
Top achievements
Rank 1
Veteran
Share this question
or