ngx-pagination icon indicating copy to clipboard operation
ngx-pagination copied to clipboard

Localization of page numbers

Open MartinJosefik opened this issue 5 years ago • 4 comments

This is not dependent on Angular, ngx-pagination etc versions, just a general question. Is it possible to localize page numbers for example into eastern arabic numbers without creating/overriding your template/component?

We use PipeTransform with Intl.NumberFormat internally to localize numbers, then it looks like <span>{{ item.contentCount | numberFormat }}</span> in the html code. Can this transformer be applied via pagination-controls directly?

MartinJosefik avatar Mar 12 '20 08:03 MartinJosefik

Hi,

Currently there is no support for this, you would indeed need to create a custom template.

michaelbromley avatar Mar 12 '20 09:03 michaelbromley

Thanks for confirming @michaelbromley .

Is this something you'd be willing to accept a PR on? We've needed to localize ngx-paginate to support Arabic numerals, as well as Arabic translations. This involved a fair amount of tweaking, and we'd be happy to contribute it back.

zainab-ali avatar Mar 17 '20 12:03 zainab-ali

Hi, yes, a PR would be welcome!

michaelbromley avatar Mar 17 '20 12:03 michaelbromley

Hello, any updates about Arabic numbers and words?

iosamammohamed avatar Jan 04 '24 08:01 iosamammohamed