Merge pull request #6 from rad9800/main

Create IsCISMachine.cpp
This commit is contained in:
vxunderground 2022-08-02 11:13:48 -05:00 committed by GitHub
commit 8f5eca39d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,35 @@
BOOL IsCISMachine()
{
LANGID UserDefaultUILang = GetUserDefaultUILanguage();
LANGID SystemDefaultLang = GetSystemDefaultLangID();
LANGID UserDefaultLangID = GetUserDefaultLangID();
static LANGID CIS_countries[] =
{
SUBLANG_RUSSIAN_RUSSIA,
SUBLANG_UKRAINIAN_UKRAINE,
SUBLANG_BELARUSIAN_BELARUS,
SUBLANG_TAJIK_TAJIKISTAN,
SUBLANG_ARMENIAN_ARMENIA,
SUBLANG_AZERI_LATIN,
SUBLANG_GEORGIAN_GEORGIA,
SUBLANG_KAZAK_KAZAKHSTAN,
SUBLANG_KYRGYZ_KYRGYZSTAN,
SUBLANG_TURKISH_TURKEY,
SUBLANG_UZBEK_LATIN,
SUBLANG_TATAR_RUSSIA,
SUBLANG_ROMANIAN_ROMANIA,
SUBLANG_SAKHA_RUSSIA,
SUBLANG_AZERI_CYRILLIC,
SUBLANG_UZBEK_CYRILLIC
};
for( unsigned short i = 0; i < _countof( CIS_countries ); i++ )
{
if( CIS_countries[i] == UserDefaultUILang ||
CIS_countries[i] == SystemDefaultLang ||
CIS_countries[i] == UserDefaultLangID )
return TRUE;
}
return FALSE;
}