Arabic localization enhancement#65
Conversation
|
Hey @elkhoudiry , thanks for your PR! Really appreciate you taking the time to improve localization I'll check this out soon and get back to you |
|
Hi @elkhoudiry , I've carefully considered your proposal. While it does address some issues, I have a couple of different ideas regarding these two main changes that I'd like to discuss with you: 1. Regarding the month name truncation issue:I noticed this primarily affects the WheelDateTimePicker. My thinking is that we could adjust the width allocation for the day, month, and year pickers within the WheelDateTimePicker component itself. Specifically, we could consider allocating relatively wider space for the year and month pickers, and narrower space for the day picker. This would help avoid truncation, rather than uniformly using Modifier.widthIn(). This approach would allow for more flexible control over the proportions of each part and enable optimization based on the actual content. 2. Regarding the new timeFormat: TimeFormat? = null parameter in
|
|
Hello @darkokoa Regarding the points you presented: 1- Ok this solution would work temporarily, i will move forward with it for now, but i have the concern of it may not be enough as we can't control the length of month names in all localizations, and the settings of the typography settings of different applications, and the available screen width where the component will be displayed. 2- Yes i agree, I myself also thought it would be a better approach after i open this PR, so i will do it and get back to you |
|
I understand your concern, and honestly I don't have a perfect solution either. I've just been trying to figure out how to make the text overflow on both sides within the WheelPicker - what do you think about this approach? If we can't find a particularly good solution in the short term, I think using widthIn(min=size.width) would be acceptable as well. |
|
I pushed the time format override. About the month name situation, Well the only thing that may have a problem is month names as they are unexpected, a |
|
Ok restored the |

First, thanks so much for the effort the library is great.
Second there is a visual bug when the locale is arabic but i suspect the same issue will exist for some other locales as well, the problem is:
WheelDateTimePickerview support month names to be inshortformat as the month cell width will be hardcoded to a small value.englishand other locales that has shorter form of the month name.arabicas actually there is no short form for month names ( at least common one ) so the view crops the month name as it shown in the image below.WheelDatePickeris used it shows the month name correctly "أغسطس" but in theWheelDateTimePickerit gets cropped to "أغسطـ"Also
timeFormatter()function is hardcoding the time format toHOUR_24in languages other than english but in arabic theAM_PMformat works well and is desirable so modified the function parameters to take the time format from the caller and defaulting tonullto keep compatibility with the currentAPI.The result:
