How to localize currency using numerictextbox for blazor

1 Answer 21 Views
NumericTextBox
Ed
Top achievements
Rank 1
Iron
Veteran
Iron
Ed asked on 29 Jun 2022, 11:50 AM

I need to be able to display currency formatted to the users locale.

My app is hosted on a machine in the U.S. but the users are in the UK.

I need to have £ for the UK and $ for the U.S.  A point in the right directly would be great!

Thanks ... Ed

 

 

1 Answer, 1 is accepted

Sort by
0
Svetoslav Dimitrov
Telerik team
answered on 04 Jul 2022, 07:50 AM

Hello Ed,

There are two different approaches you can take to achieve the desired behavior:

  • You can implement a Globalization dropdown in your application like in our Globalization demos. If you change the language from the DropDown you will see that the currency denominator will change accordingly. 
  • Use a WASM application. The server-side Blazor application takes the current culture of the server that hosts the application. So if you host the application in the US, the currency sign will be USD ($). If you are using a WASM application, it will automatically take the culture from the client's machine and apply the correct currency sign.

Let me know if this helps you move forward.

Regards,
Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
NumericTextBox
Asked by
Ed
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or