today I need help to find a small B4A-Code snipped to change the language of a connected device (for example via B4XBridge or Emulator).
It's just to test apps on devices with different languages. I looked for AHlocale and Localizator but that is no what I'm looking for.
I think it will go into direction of using a java object but I do'nt no the parameters and exactly how to code.
I'm getting this error on some devices java.text.ParseException: Unparseable date: "Sun, 05 Feb 2017 22:06:02 +0100" (at offset 0) with this code DateTime.DateFormat = "EEE, dd MMM yyyy HH:mm:ss Z" Dim sDate As String = "Sun, 05 Feb 2017 22:06:02 +0100" Dim lngDate As Long =...
Thank you Erel,
I know this code and I tested it. But ervery way I choose with the locale code (GE, DE, de a.s.o) I am getting the error that the country code ist not known.
But it is good to know that there is no way to change the device language by code. Does'
nt matter I will find an another way. Stay well. Günter
Dim jo As JavaObject
jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("GERMANY")))
' or jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("GERMAN")))
It is always helpful to read the documentation before jumping to conclusions. For some languages the abbreviation is good for others it is necessary to write in full.