Change currency

Posted by Bert Binnenmarsch on 17-May-2017 03:29

Currency is displayed as: $1,745.00

How can I change this to: €1.745,00

Not all countries in Europe are using the euro, so it would even be better if the currency as set in the Control Panel of Windows would be picked up.

This is also useful for the date format where 31/12/2017, 31-12-2017 and 31.12.2017 are valid notations in different countries in Europe.

Posted by Anil Kumar on 17-May-2017 11:19

Hi Bert,
 
We can achieve this by modifying the ejs template via adding culture specific library information. Following are set of steps I have performed:
 
When we perform ‘Preview’ operation without any changes data is displayed as below. i.e., Default behavior:
 
 
Modifying the currency to Euro:

1)      Download culture file (kendo.culture.de-DE.js) from Github location

2)      Place it in the scripts/lib directory of the KUIB webapp (<web_app_Location>/resources/scripts/lib)

3)      Modify the entries of index.html.ejs file located ‘webapp’ directory (<web_app_Location>/resources/resources/webapp)

 
<!-- build:js({.tmp,app}) scripts/scripts.js -->
    <script src="scripts/lib/kendo.all.js"></script>
   <script src="scripts/lib/kendo.culture.de-DE.js"></script>
    <script src="scripts/lib/progress.all.js"></script>
    <script src="scripts/app.js"></script>
….
<!-- endbuild -->
               
<script type="text/javascript">
       kendo.culture("de-DE");
   </script>

4)      Perform ‘Build’ operation in KUIB and do a ‘Preview’ and data is shown as below:

 
 
Change the Pattern of the currency:

1)      Edit the ‘kendo.culture.de-DE.js’ file located in ‘(<web_app_Location>/resources/scripts/lib’ directory as below

currency: {

                name: "Euro",

                abbr: "EUR",

                pattern: ["($n)","$n"],

                decimals: 2,

                ",": ".",

                ".": ",",

                groupSize: [3],

                symbol: "€"

            }

2)      Perform ‘Build’ operation in KUIB and do a ‘Preview’ and data is shown as below:

 

 
Note: There is also similar post in communities pertaining to KUIB 1.0 release.
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar.
 

All Replies

Posted by Anil Kumar on 17-May-2017 11:19

Hi Bert,
 
We can achieve this by modifying the ejs template via adding culture specific library information. Following are set of steps I have performed:
 
When we perform ‘Preview’ operation without any changes data is displayed as below. i.e., Default behavior:
 
 
Modifying the currency to Euro:

1)      Download culture file (kendo.culture.de-DE.js) from Github location

2)      Place it in the scripts/lib directory of the KUIB webapp (<web_app_Location>/resources/scripts/lib)

3)      Modify the entries of index.html.ejs file located ‘webapp’ directory (<web_app_Location>/resources/resources/webapp)

 
<!-- build:js({.tmp,app}) scripts/scripts.js -->
    <script src="scripts/lib/kendo.all.js"></script>
   <script src="scripts/lib/kendo.culture.de-DE.js"></script>
    <script src="scripts/lib/progress.all.js"></script>
    <script src="scripts/app.js"></script>
….
<!-- endbuild -->
               
<script type="text/javascript">
       kendo.culture("de-DE");
   </script>

4)      Perform ‘Build’ operation in KUIB and do a ‘Preview’ and data is shown as below:

 
 
Change the Pattern of the currency:

1)      Edit the ‘kendo.culture.de-DE.js’ file located in ‘(<web_app_Location>/resources/scripts/lib’ directory as below

currency: {

                name: "Euro",

                abbr: "EUR",

                pattern: ["($n)","$n"],

                decimals: 2,

                ",": ".",

                ".": ",",

                groupSize: [3],

                symbol: "€"

            }

2)      Perform ‘Build’ operation in KUIB and do a ‘Preview’ and data is shown as below:

 

 
Note: There is also similar post in communities pertaining to KUIB 1.0 release.
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar.
 

This thread is closed