Android Question Bilingual Support

udg

Expert
Licensed User
Longtime User
Hi,

you could use code like the following to discover the language set for the device and a simple if..then..else clause to set your menu items accordigly (i.e. language1 for a specific language and language2 for any other).
B4X:
'returns two-letters device default language
Sub GetDefaultLanguage As String
  Dim r As Reflector
  r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null)
  Return r.RunMethod("getLanguage")
End Sub

udg
 
Upvote 0
Top