@@ -8,6 +8,7 @@ import { IgxIconModule } from '../icon/index';
88import { IgxButtonModule } from '../directives/button/button.directive' ;
99import { IgxRippleModule } from '../directives/ripple/ripple.directive' ;
1010import { IgxInputGroupModule } from '../input-group' ;
11+ import { IPaginatorResourceStrings } from '../core/i18n/paginator-resources' ;
1112
1213@Component ( {
1314 selector : 'igx-paginator' ,
@@ -19,6 +20,7 @@ export class IgxPaginatorComponent extends DisplayDensityBase {
1920 * Total pages calculated from totalRecords and perPage
2021 */
2122 public totalPages : number ;
23+ private _resourceStrings = CurrentResourceStrings . PaginatorResStrings ;
2224 protected _page = 0 ;
2325 protected _totalRecords : number ;
2426 protected _selectOptions ;
@@ -159,56 +161,21 @@ export class IgxPaginatorComponent extends DisplayDensityBase {
159161 @Input ( )
160162 public dropdownHidden = false ;
161163
162- /**
163- * An @Input property, sets number of label of the select.
164- * The default is 'Items per page' localized string.
165- * ```html
166- * <igx-paginator label="My custom label"></igx-paginator>
167- * ```
168- * @memberof IgxPaginatorComponent
169- */
164+ /**
165+ * An accessor that sets the resource strings.
166+ * By default it uses EN resources.
167+ */
170168 @Input ( )
171- public selectLabel = CurrentResourceStrings . PaginatorResStrings . igx_paginator_label ;
172-
173- /**
174- * An @Input property, sets a preposition between the current page and total pages.
175- * The default is 'of' localized string.
176- * @memberof IgxPaginatorComponent
177- */
178- @Input ( )
179- public prepositionPage = CurrentResourceStrings . PaginatorResStrings . igx_paginator_pager_text ;
180-
181- /**
182- * An @Input property, sets a tooltip text for first page button label
183- * The default is 'Go to first page' localized string.
184- * @memberof IgxPaginatorComponent
185- */
186- @Input ( )
187- public firstPageLabel = CurrentResourceStrings . PaginatorResStrings . igx_paginator_first_page_button_text ;
188-
189- /**
190- * An @Input property, sets a tooltip text for the previous page button label
191- * The default is 'Previous page' localized string.
192- * @memberof IgxPaginatorComponent
193- */
194- @Input ( )
195- public previousPageLabel = CurrentResourceStrings . PaginatorResStrings . igx_paginator_previous_page_button_text ;
196-
197- /**
198- * An @Input property, sets a tooltip text for last page button label
199- * The default is 'Go to last page' localized string.
200- * @memberof IgxPaginatorComponent
201- */
202- @Input ( )
203- public lastPageLabel = CurrentResourceStrings . PaginatorResStrings . igx_paginator_last_page_button_text ;
169+ set resourceStrings ( value : IPaginatorResourceStrings ) {
170+ this . _resourceStrings = Object . assign ( { } , this . _resourceStrings , value ) ;
171+ }
204172
205- /**
206- * An @Input property, sets a tooltip text for the next page button label
207- * The default is 'Next page' localized string.
208- * @memberof IgxPaginatorComponent
209- */
210- @Input ( )
211- public nextPageLabel = CurrentResourceStrings . PaginatorResStrings . igx_paginator_next_page_button_text ;
173+ /**
174+ * An accessor that returns the resource strings.
175+ */
176+ get resourceStrings ( ) : IPaginatorResourceStrings {
177+ return this . _resourceStrings ;
178+ }
212179
213180 /**
214181 * An event that is emitted when the select in the `IgxPaginatorComponent` changes its value.
0 commit comments