How to change currency symbol without changing locale?

4 posts, 0 answers
  1. Michaël
    Michaël avatar
    44 posts
    Member since:
    Feb 2014

    Posted 28 Apr 2014 Link to this post

    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!
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Apr 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Michaël
    Michaël avatar
    44 posts
    Member since:
    Feb 2014

    Posted 29 Apr 2014 in reply to Georgi Krustev Link to this post

    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 ;).
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Apr 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready