Forum Discussion

vinodkumar_chau's avatar
vinodkumar_chau
Contributor
9 years ago
Solved

How should i get region and language name using GetLocaleInfo

Hi All
Below codes gives error.I am trying to get language and region name from system
Error "The requested information about locale could not be obtained"
function GetLocaleName()
{
var intLCID = Win32API.GetUserDefaultLCID();
LOCALE_SNAME = intLCID;
Log.Message(GetLocaleInfoEx(LOCALE_USER_DEFAULT, LOCALE_SNAME));
}

 

How should i get region and language name ?

  • in Delphi :

     

    Log.Message(aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLANGUAGE));

1 Reply

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    in Delphi :

     

    Log.Message(aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLANGUAGE));