Android Question how to get the device locale

wbtcpip

Member
Licensed User
Longtime User
How i could get the current device language? I want to know if the device is in english, french, italian or what ... thanks
 

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
Sub Get_Language As String 
    Try
       Dim r As Reflector
       r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null)
       Return r.RunMethod("toString")
    Catch
        Return "en"
    End Try
End Sub
 
Upvote 0
Top