daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 520 forks source link

Translate (Page: Rows per page:) to another language #575

Closed muscaiu closed 7 years ago

muscaiu commented 7 years ago

How can i translate this to another language?

2017-04-04_11h41_18

<md-table-pagination md-limit="sort.limit" md-limit-options="limitOptions" md-page="sort.page" md-total="{{int.interviewsList.length}}"
    md-on-paginate="promiseInterviews" md-page-select></md-table-pagination>
ielektronick commented 7 years ago

Hi muscaiu As far as I can see there's a mdLabel attribute available. It accepts an object with 3 possible properties: page, rowsPerPage and of. So, the mark-up is:

<md-table-pagination md-limit="query.limit" md-limit-options="[5, 10]" 
        md-page="query.page" md-total="{{items.length}}" md-page-select 
        md-label="{ page: 'Сторiнка', rowsPerPage: 'Кiлькiсть на сторiнку', of: 'з' }">
</md-table-pagination>

And the result: 1

muscaiu commented 7 years ago

Thanks brother!

marceloavan commented 7 years ago

Is there some way to translate these informations in config phase using something like a provider?