B4J Question [ABMaterial] how to detect client browser language and use it?

Cableguy

Expert
Licensed User
Longtime User
Hi guys,

I guess the title says it all!
How to detect the browser language? A simple example would be great!
 

mindful

Active Member
Licensed User
I am not at the pc anymore but you can check the DemoDynamic example provided with the ABMaterial. See in ABMApplication in WebSocket_Connected. I will post an example when I get to the pc if still needed.
 
Upvote 0

mindful

Active Member
Licensed User
Hi guys,

I guess the title says it all!
How to detect the browser language? A simple example would be great!

Here is the code from the DemoDynamic:
B4X:
    Dim ActiveFoundLanguage As String = AppPage.DetectLanguage(ws.UpgradeRequest.GetHeader("Accept-Language"))
    Log("Users browser language: " & ActiveFoundLanguage)
 
Upvote 0
Top