AngularJS column filter localisation

6 posts, 0 answers
  1. Gregor
    Gregor avatar
    15 posts
    Member since:
    Jan 2011

    Posted 22 Feb 2016 Link to this post

    Hi there, i could't get it to work that the filter option will be translated with AngularJS.

    my html:

      <kendo-grid id="grid" options="mainGridOptions" k-rebind='transtest' k-data-source="mydataSource" k-on-change="change(kendoEvent)"></kendo-grid>

    in JS i tried this:

     var baseUrl = serviceBase + 'scripts/Kendo/JS/messages/kendo.messages.';
            $.getScript(baseUrl + langKey+ ".min.js", function () {
                $translate.use(langKey);//change angular-translate language
                kendo.culture(langKey); //change kendo culture
            });

    Please help

  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 24 Feb 2016 Link to this post

    Hi Gregor,

    After localization file is loaded all Kendo Widgets that have to be translated should be re-initialized.
    In your case the Grid widget has k-rebind attribute which will re-create the Grid when the 'transtest' is changed.

    In order to see the new localization messages applied you should force Grid re-initialization.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Gregor
    Gregor avatar
    15 posts
    Member since:
    Jan 2011

    Posted 25 Feb 2016 in reply to Alexander Valchev Link to this post

    Hi Alexander.

    I tried and set  $scope.transtest = Date.now();

    But it will not work. Can you place an Angualr Grid excample with the binding i used and with a working filter language translation ?

  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 29 Feb 2016 Link to this post

    Hello Gregor,

    I prepared a small example: http://dojo.telerik.com/eRIZA

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Gregor
    Gregor avatar
    15 posts
    Member since:
    Jan 2011

    Posted 29 Feb 2016 in reply to Alexander Valchev Link to this post

    Hello Alexander.

    Thanks for your sample, but i'm still struggeling.

    I took the html from your dojo, put it in an empty html an tested it. 

    Ok i have no data ( for sure ) but the language translation of the filter elements are not working any more...

    Can you help ?

     

    Regrads

     

    Gregor

     

  6. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 02 Mar 2016 Link to this post

    Hi Gregor,

    How your test page differs from mine? Do you see any JavaScript errors in the browser console?

    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