# With Angular Translate

You can use `Angular Translate` with Angular DataTables seamlessly.

angular.module('showcase', ['datatables', 'pascalprecht.translate']) .config(translateConfig) .controller('WithAngularTranslateCtrl', WithAngularTranslateCtrl); function translateConfig($translateProvider) { $translateProvider.translations('en', { id: 'ID with angular-translate', firstName: 'First name with angular-translate', lastName: 'Last name with angular-translate' }); $translateProvider.preferredLanguage('en'); } function WithAngularTranslateCtrl(DTOptionsBuilder, DTColumnBuilder, $translate) { var vm = this; vm.dtOptions = DTOptionsBuilder.fromSource('data.json'); vm.dtColumns = [ // You can provide the title directly in the newColum second parameter DTColumnBuilder.newColumn('id', $translate('id')), // Or you can use the withTitle helper DTColumnBuilder.newColumn('firstName').withTitle($translate('firstName')), DTColumnBuilder.newColumn('lastName').withTitle($translate('lastName')) ]; }