I live in Italy and the day of week is correctly shown in italian, but after the latest update of my app yesterday, now it is shown in english, not converted to local.
Yes, I'm not declaring CFBundleLocalizations but Iphone settings are in italian ....
The app is running since 3 years but this change has happened in my last update.
I see there is a workaround (need to test it) but really I don't want to force italian language, just let the phone setting to decide. And when the setting are italian I expect to see the week day in italian (as it was working since 3 years).
We do not know what is inside DateTime library. But according Erel's post following subroutine changes locale inside DateTime library.
B4X:
Sub SetDateTimeLocale (locale As String)
Dim loc As NativeObject
loc = loc.Initialize("NSLocale").RunMethod("localeWithLocaleIdentifier:", Array(locale))
Dim no As NativeObject = DateTime
no.GetField ("dateFormat").SetField ("locale", loc)
no.GetField ("timeFormat").SetField ("locale", loc)
End Sub
As I understand, you want to see the names of days according iPhone UI language.
Stackoverflow recommends
B4X:
NSString * language = [[NSLocale preferredLanguages] firstObject];