jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. React and Vue components are also included.
https://intl-tel-input.com
MIT License
7.6k stars 1.94k forks source link

Arabic locale #1599

Closed eplatforms-uk closed 5 months ago

eplatforms-uk commented 5 months ago

Arabic locale isn't right to left. You need support for this.

jackocnr commented 5 months ago

The Arabic translation strings are all here: https://github.com/jackocnr/intl-tel-input/tree/master/build/js/i18n/ar

Can you provide an example of an incorrect translation string, and say how it should be instead?

jackocnr commented 5 months ago

And have you tried adding dir="rtl" to a container/ancestor element?

eplatforms-uk commented 5 months ago

Yes but you will see it comes from left to right automatically instead of right to left. I'm proposing an option somewhere should be considered. Translation itself is fine.

jackocnr commented 5 months ago

Are you talking about CSS changes? You will see we have several RTL styles already: https://github.com/jackocnr/intl-tel-input/blob/master/src/css/intlTelInput.scss (search "rtl"), but perhaps they're out of date now? I would welcome a PR to update them.

eplatforms-uk commented 5 months ago

We can do a RTL with CSS of course. But if you are using the react then by default Arabic should be right to left.

jackocnr commented 4 months ago

I added a RTL demo page here for future reference: https://intl-tel-input.com/examples/right-to-left.html