Android Question (solved)how to get country code in B4A?

Discussion in 'Android Questions' started by Maodge, May 9, 2018.

  1. Maodge

    Maodge Member Licensed User

    hello,
    how to get country code in B4A, and which lib should i use? I want use this parameter for automatic selection of language.
    thanks.
     
  2. ronell

    ronell Well-Known Member Licensed User

  3. klaus

    klaus Expert Licensed User

    You can use the AHLocale library.
    And with this code:
    Code:
    Private AHL As AHLocale
    AHL.Initialize
    Log(AHL.DisplayCountry)
    Log(AHL.Country)
    DisplayCountry returns the full country name, 'Suisse' in my case, french language setting.
    Country returns the country code, 'CH' in my case
     
    DonManfred likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice