N noeleon Active Member Licensed User Longtime User Nov 29, 2019 #1 how to set the locale of datetime.timeformat to English so it does not return time in the current device language like Arabic? 01:23.45 instead of ۰۰:۰۳.۱۳ Thanks.
how to set the locale of datetime.timeformat to English so it does not return time in the current device language like Arabic? 01:23.45 instead of ۰۰:۰۳.۱۳ Thanks.
LucaMs Expert Licensed User Longtime User Nov 29, 2019 #2 DateTime.TimeFormat = "hh:mm:ss" DateTime.TimeFormat = "h:mm a" to get AM or PM Upvote 0
N noeleon Active Member Licensed User Longtime User Nov 29, 2019 #3 I'm using DateTime.TimeFormat = "mm:ss.SS" The problem is if I set the device language to Arabic the time returned by datetime becomes Arabic numbers too. Last edited: Nov 29, 2019 Upvote 0
I'm using DateTime.TimeFormat = "mm:ss.SS" The problem is if I set the device language to Arabic the time returned by datetime becomes Arabic numbers too.
LucaMs Expert Licensed User Longtime User Nov 29, 2019 #4 noeleon said: I'm using DateTime.TimeFormat = "mm:ss.SS" The problem is if I set the device language to Arabic the time returned by datetime becomes Arabic numbers too. Click to expand... Damn... to test it, now I don't know how to return to my beautiful italian Anyway, I get the right time (37:12:15) (SS are milliseconds) Upvote 0
noeleon said: I'm using DateTime.TimeFormat = "mm:ss.SS" The problem is if I set the device language to Arabic the time returned by datetime becomes Arabic numbers too. Click to expand... Damn... to test it, now I don't know how to return to my beautiful italian Anyway, I get the right time (37:12:15) (SS are milliseconds)
LucaMs Expert Licensed User Longtime User Nov 29, 2019 #5 LucaMs said: Damn... to test it, now I don't know how to return to my beautiful italian Click to expand... What an effort, I succeeded Upvote 0
LucaMs said: Damn... to test it, now I don't know how to return to my beautiful italian Click to expand... What an effort, I succeeded
N noeleon Active Member Licensed User Longtime User Nov 29, 2019 #6 LOL !!! It really does take a lot of effort changing language back especially from RTL language. Upvote 0
N noeleon Active Member Licensed User Longtime User Nov 29, 2019 #7 This is what I'm going to do: Set locale in my app to US and then switch to Arabic only during text input then switch back to US right after, using this Code: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("US"))) Upvote 0
This is what I'm going to do: Set locale in my app to US and then switch to Arabic only during text input then switch back to US right after, using this Code: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("US")))
N noeleon Active Member Licensed User Longtime User Nov 30, 2019 #8 ARRRGH!! I thought it's as simple as replacing US with AR. Upvote 0
LucaMs Expert Licensed User Longtime User Nov 30, 2019 #9 noeleon said: ARRRGH!! I thought it's as simple as replacing US with AR. Click to expand... Try this library: https://www.b4x.com/android/forum/threads/locale-jar.96761/ (and also "ar", lowercase) Upvote 0
noeleon said: ARRRGH!! I thought it's as simple as replacing US with AR. Click to expand... Try this library: https://www.b4x.com/android/forum/threads/locale-jar.96761/ (and also "ar", lowercase)
N noeleon Active Member Licensed User Longtime User Nov 30, 2019 #10 Thanks for your suggestions. Upvote 0