This repository has been archived by the owner on May 1, 2024. It is now read-only.
CultureInfo class not loading native digits #14110
Unanswered
raihaniqbal
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Please, ask your question here and tag Xamarin.Forms and Xamarin https://docs.microsoft.com/en-us/answers/products/dotnet?WT.mc_id=xamarinforumsredirect-web-xamarin |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to localize my Xamarin forms app and I noticed that my datetimes were not being localized. When I inspected the culture info object, I noticed the NativeDigits array was populated with English digits.
This is what I get in my Xamarin project
![Xamarin project culture info object](https://camo.githubusercontent.com/bcce02cbda31f075834a0676fbe3b56160935cc89afc014c0a0507640575560c/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f6f507738422e706e67)
This is what it should look like
![Screenshot from .NET forms project](https://camo.githubusercontent.com/a7bef64ff3166d2156b269c2a38a3bb0e44987b0578d3b04597bd0f52d150df7/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f52537733762e706e67)
I have sample application which demonstrates this.
https://github.com/raihaniqbal/MultilingualXFSample
Fyi, this issue is not restricted to Arabic. You can pick any other language that has non-English digits.
Just add the following code in a XF project and inspect the CultureInfo object:
CultureInfo.GetCultureInfo("ar-AE")
Beta Was this translation helpful? Give feedback.
All reactions