Localizator is a cross platform solution for strings localization. The strings are defined in an Excel workbook. They are then converted to a SQLite database file with a B4J program: The database file should be added to the Files tab of your application. Localizator is a class. You need...
Sub GetPreferredLanguage As String
Dim no As NativeObject
Return no.Initialize("NSLocale") _
.RunMethod("preferredLanguages", Null).RunMethod("objectAtIndex:", Array(0)).AsString
End Sub
Cross platform code to change the date format with an explicit locale: Private Sub SetDateFormat(Language As String, Country As String, format As String) #if B4A or B4J Dim locale As JavaObject locale.InitializeNewInstance("java.util.Locale", Array(Language, Country)) Dim...
Sub GetPreferredLanguage As String
Dim no As NativeObject
Return no.Initialize("NSLocale") _
.RunMethod("preferredLanguages", Null).RunMethod("objectAtIndex:", Array(0)).AsString
End Sub
Cross platform code to change the date format with an explicit locale: Private Sub SetDateFormat(Language As String, Country As String, format As String) #if B4A or B4J Dim locale As JavaObject locale.InitializeNewInstance("java.util.Locale", Array(Language, Country)) Dim...