Skip to content

Commit 09aed8e

Browse files
author
Ulisses de Paula Meira
committed
New localized string prepositionPage
Sets a preposition between the current page and total pages
1 parent db37582 commit 09aed8e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export interface IPaginatorResourceStrings {
22
igx_paginator_label?: string;
3+
igx_paginator_pager_text?:string;
34
}
45

56
export const PaginatorResourceStringsEN: IPaginatorResourceStrings = {
6-
igx_paginator_label: 'Items per page'
7+
igx_paginator_label: 'Items per page',
8+
igx_paginator_pager_text: 'of'
79
};

projects/igniteui-angular/src/lib/paginator/paginator.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</button>
1919
<div class='igx-paginator__pager-text'>
2020
<span>{{ page + 1 }}</span>
21-
<span>&nbsp;of&nbsp;</span>
21+
<span>&nbsp;{{prepositionPage}}&nbsp;</span>
2222
<span>{{ totalPages }}</span>
2323
</div>
2424
<button [disabled]="isLastPage || !pagerEnabled ? true: false" (click)="nextPage()" igxRipple igxRippleCentered="true" igxButton="icon">

projects/igniteui-angular/src/lib/paginator/paginator.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ export class IgxPaginatorComponent extends DisplayDensityBase {
169169
@Input()
170170
public selectLabel = CurrentResourceStrings.PaginatorResStrings.igx_paginator_label;
171171

172+
/**
173+
* An @Input property, sets a preposition between the current page and total pages.
174+
* The default is 'of' localized string.
175+
* @memberof IgxPaginatorComponent
176+
*/
177+
@Input()
178+
public prepositionPage = CurrentResourceStrings.PaginatorResStrings.igx_paginator_pager_text;
179+
172180
/**
173181
* An event that is emitted when the select in the `IgxPaginatorComponent` changes its value.
174182
*/

0 commit comments

Comments
 (0)