josebalius / ngReactGrid

A really fast Angular grid using the power of React to render. Based on ng-grid and jQuery DataTables.
http://josebalius.github.io/ngReactGrid/
MIT License
328 stars 47 forks source link

Add translation options. #47

Open kashcode opened 9 years ago

kashcode commented 9 years ago

It will be very nice if there will be some translation options.

josebalius commented 9 years ago

@turbosasa yeah good point, it would be nice to be able to override the prev/next, sort controls, etc.

kashcode commented 9 years ago

@josebalius for translation I locally create provider where I define all words and in config block I override defaults

.config(function (ngReactGridI18nProvider) {
    angular.extend(ngReactGridI18nProvider.defaults, {
        page: 'Lapa',
        of: 'no',
        showing: 'Attēlojam ',
        records: 'ierakstiem',
        show: 'Rādīt',
        entries: 'ierakstus',
        prev: '<',
        first: '|<',
        last: '>|',
        next: '>',
        no_records_found: 'Nav neviena ieraksta',
        search: 'Meklēt...',
        loading: 'Noteik datu ielāde...'
    });        
});

I try prepare PR for this.

josebalius commented 9 years ago

This will be supported in https://github.com/josebalius/react-grid however we will have to think of a way to make the Angular adapter pass in these properties.