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

AngularJS column filter localisation

5 Answers 187 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gregor
Top achievements
Rank 1
Gregor asked on 22 Feb 2016, 11:02 AM

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

5 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 24 Feb 2016, 10:17 AM
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!
 
0
Gregor
Top achievements
Rank 1
answered on 25 Feb 2016, 09:42 AM

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 ?

0
Alexander Valchev
Telerik team
answered on 29 Feb 2016, 09:14 AM
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!
 
0
Gregor
Top achievements
Rank 1
answered on 29 Feb 2016, 01:44 PM

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

 

0
Alexander Valchev
Telerik team
answered on 02 Mar 2016, 12:55 PM
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!
 
Tags
Grid
Asked by
Gregor
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Gregor
Top achievements
Rank 1
Share this question
or