We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Translation of headertext with angular-translate

Thread ID:





121780 Jan 25,2016 02:42 PM UTC Jan 28,2016 03:49 AM UTC JavaScript 3
Tags: ejGrid
Antonio Terron
Asked On January 25, 2016 02:42 PM UTC

I'm using  angular-translate (https://github.com/angular-translate/angular-translate)  for internationalization and localization of my application but I'm not able to translate headertext for columns...

I've tried this :

$translate(['ROOM', 'CUSTNAME', 'DATE', 'CALLS', 'AMOUNT']).then(function (trans) {

$scope.cols = [

{ field: "ID", width: 150, visible: false },

{ field: "Extension", headerText: trans.ROOM, width: 180 },

{ field: "CustName", headerText: trans.CUSTNAME, width: 175 },

{ field: "Datetime", headerText: trans.DATE, width: 175},

{ field: "Calls", headerText: trans.CALLS, width: 180},

{ field: "Amount", headerText: trans.AMOUNT, width: 110 }



but simply the grid does not appear...

Can you please provide any clues? Can the angular-translate directives be used instead of trying to tranlate in the controller?

Thank you in advance

Gowthami V [Syncfusion]
Replied On January 26, 2016 06:13 PM UTC

Hi Antonio,

We are unable to reproduce the issue and please provide us below details,

1.    If you got below script error,

Then refer to the below link for more information,


2.    Share the script error details from console if any other.

3.    Share the full code example that you have used to render the grid.


Gowthami V.

Antonio Terron
Replied On January 27, 2016 08:46 AM UTC

Thank you for your answer. I've resolved this issue changing the way I translate the columns header.

Now I'm using the $filter service:

$scope.cols = [

{ field: "CheckoutID", width: 150, visible: false },

{ field: "Extension", headerText: $filter('translate')('ROOM'), width: 180 },

{ field: "CustName", headerText: $filter('translate')('CUSTOMERNAME'), width: 175 },

{ field: "DateTime", headerText: $filter('translate')('DATE'), width: 175, format: dateformat},

{ field: "Calls", headerText: $filter('translate')('CALLS'), width: 180, textAlign: "right", headertextAlign: "right" },

{ field: "Amount", headerText: $filter('translate')('AMOUNT'), width: 110, textAlign: "right", headertextAlign: "right", format: '{0:N2}' }


Ragavee U S [Syncfusion]
Replied On January 28, 2016 03:49 AM UTC

Hi Antonio,

Thanks for your update.

We are happy that your issue is resolved.

Ragavee U S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon