In debug mode I have no problem. My day and month names in datetime are in my language, but in release mode and after compiling with B4jpackager11 they are in english.
How to resolve this?
I'm trying to use this code:
..but I have a problem when I try to use Serbian language with latin letters (they are using both cyrillic and latin). With sr & RS for as parameters for language and country i get cyrillic letters. How to get sr-latn-RS?
How to resolve this?
I'm trying to use this code:
B4X:
Sub ConvertDate(DateTimeString As String, DateTimeFormat As String, NewDateTimeFormat As String,Language As String,Country As String) As String 'ignore
Dim JOLocale As JavaObject
Dim JODTConvertTo As JavaObject
Dim JODTConvertFrom As JavaObject
Dim JODate As JavaObject
JOLocale.InitializeNewInstance("java.util.Locale",Array As Object(Language,Country))
JODTConvertTo.InitializeNewInstance("java.text.SimpleDateFormat",Array As Object(NewDateTimeFormat,JOLocale))
JODTConvertFrom.InitializeNewInstance("java.text.SimpleDateFormat",Array As Object(DateTimeFormat))
JODate = JODTConvertFrom.RunMethod("parse",Array As Object(DateTimeString))
Return JODTConvertTo.RunMethod("format",Array As Object(JODate))
End Sub