Android Question Change ApplicationLabel

roncoa

Member
Licensed User
Longtime User
How can I change the ApplicationLabel depending on the language?
Hello, thank you.
 
Do you mean the Activity title?
You can detect the Language with this code:
Code: Copy
Sub Activity_Create(FirstTime As Boolean)
  Log(GetDefaultLanguage)
End Sub

Sub GetDefaultLanguage As String
  Dim r As Reflector
  r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null)
  Return r.RunMethod("getLanguagee")
End Sub

You will need the Relfection library. You can detect the language and so put whatever you want in the Label
 
Upvote 0
Did you read my post in the Italian forum?
Anyway, check this response from Erel and then follow the link in the post below it

udg
 
Upvote 0
Back
Top