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

How to change currency symbol without changing locale?

3 Answers 968 Views
Globalization
This is a migrated thread and some comments may be shown as answers.
Michaël
Top achievements
Rank 1
Michaël asked on 28 Apr 2014, 08:39 PM
Hi,

I'd like to take advantage of the automatic currency formatting (using the "c" option), but by setting a specific currency symbol. However, I do not want to change the locale (which seems to be the recommended solution), because what I want is not changing the way number is formatted, BUT only the currency symbol.

Is that possible? I've tried several things but with no success.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 29 Apr 2014, 11:35 AM
Hello Michaël,

In general, the format depends on the current Kendo culture. If you need to change just the currency symbol and keep the rest of the culture settings then you can override the currency symbol value:
var culture = kendo.culture();
 
culture.numberFormat.currency.symbol = "[custom currency symbol]";
Note that you will need to override the symbol before the widget initialization.
The other option is to define a custom culture and configure the widget to use it.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Michaël
Top achievements
Rank 1
answered on 29 Apr 2014, 12:16 PM
Hi,

Thanks a lot, this solution works like a charm, this should really be more documented.

> In general, the format depends on the current Kendo culture.

I really don't agree with that. A lot of time you need to output values in different currencies, but using the same culture ;).
0
Georgi Krustev
Telerik team
answered on 29 Apr 2014, 12:42 PM
Hello Michaël,

Please excuse me for the misunderstanding. By "the format depends on the current Kendo culture" statement I wanted to explain that the standard/custom numeric formats used by kendo.toString (this method is used internally in the widget) depends on the used Kendo culture.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Globalization
Asked by
Michaël
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Michaël
Top achievements
Rank 1
Share this question
or