xornorik / SVPinView

SVPinView is a light-weight customisable library used for accepting pin numbers or one-time passwords.
MIT License
282 stars 90 forks source link

English and Arabic Localization #31

Closed nishan-p closed 4 years ago

nishan-p commented 5 years ago

I'm using English and Arabic Localization for my app and I have used this Pinview within my app. This is automatically changing the alignment from Left to Right. I do not want the change in the alignment.

I want to have the same as it is, like first textfield will start from left and last textfield on the right. I want this similar functionality in both English and Arabic.

Sobhi-IOS commented 4 years ago

@xornorik can you reslove this issue ?

xornorik commented 4 years ago

I had fixed this issue in one of the earlier releases by enforcing the semantic to be left-to-right.

Could you help me with recreating the issue? I have tried changing the language on the device and also editing the "Application language" field in the scheme; it stayed left-to-right as intended.

screenrecord

usamabinattique commented 4 years ago

Can you please pinpoint where the semantics needs to be changed because i am facing the same issue

xornorik commented 4 years ago

@usamabinattique I've already changed the semantic to force a left-to-right entry and I was able to confirm it by changing the language on the device (gif attached in my previous comment).

Screenshot 2020-04-11 11 59 38

Could you help me recreate this?

aliakhtar49 commented 4 years ago

@xornorik By changing language at runtime on the same session , force a left-to-right entry will not work On new relaunch force a left-to-right entry will work

xornorik commented 4 years ago

@aliakhtar49 I tried that, also tried editing the scheme and changing the application language from there. Same result i.e it maintains the left-to-right entry.

ezgif-2-843061718d06

This is when I relaunch after the language change.

aliakhtar49 commented 4 years ago

@xornorik By changing language at runtime (I was referring to in app mechanism we used to change language on button taped irrespective of the system ) where we manually loaded resources our selves

https://stackoverflow.com/questions/31840176/changing-language-on-the-fly-in-swift

xornorik commented 4 years ago

@aliakhtar49 Apologies for the late response. I understood your point about changing the language at runtime. However, my confusion stems from the fact that when the semantic has been hard-coded to be Force Left-to-Right, there should never be a case when the entry begins from the right. Am I missing something?

riazhazan commented 4 years ago

@xornorik still when the UI layout is RTL the SVPinView also mirroring, I mean the entry starts from right to left.

xornorik commented 4 years ago

I've added some logic in the latest version (v1.0.9) to fix this issue. Since I'm unable to recreate this at my end, could someone here confirm and close if it has indeed been fixed. Thank you.