globalization with AngularJS

3 posts, 0 answers
  1. Konrad
    Konrad avatar
    2 posts
    Member since:
    Sep 2014

    Posted 15 Sep 2014 Link to this post

    1. I configured filters for grid but after changing language there are not translated. How to use messages from kendo.messages.xx-XX.min.js files in such setup:
    filterable :{
                extra: false,
                operators: {
                    string: {
                        contains: 'Contains',
                        eq: 'Is equal',
                        neq: 'Is not equal'
                    },
                    date: {
                        lte: 'To',
                        gte: 'From'
                    },
                    number: {
                        eq: 'Is equal',
                        neq: 'Is not equal',
                        gt: 'Greater then',
                        gte: 'Greater then or equal',
                        lt: 'Less then',
                        lte: 'Less then or equal'
                    }
                }
            },

    2. I use $translateProvider in AngularJS for translations and tried to setup in config also kendo.culture("en-GB"); but it doesn't work. How to setup translations for AngularJS with ability to change dynamically to be consistent with $translate service if needed 

  2. Konrad
    Konrad avatar
    2 posts
    Member since:
    Sep 2014

    Posted 15 Sep 2014 Link to this post

    Mentioned in 1 setup is done in factory method of the service
    return {
    filterable :{
  3. Kendo UI is VS 2017 Ready
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 17 Sep 2014 Link to this post

    Hello Konrad,

    Regarding your questions:

    1. Whatever is put in the filterable configuration object will override the kendo.messages.xx-XX.js configuration. In other words if you would like to customize the operators through the filterable configuration object you will have to also handle the translations.

    2. Kendo culture can be changed at runtime through the culture method. It is important to note that the corresponding culture files should be loaded before kendo.culture is executed. The messages files work in a different way - they modify the default values of the messages in the widget's prototype object. This is why in order to change the widget messages you should at first load the file and then re-create the widget. We prepared a code library project which demonstrates how this can be done.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top