#include "StdAfx.h"
#include "LanguageID.h"



unsigned int 
GetPrimaryLanguageID()
{
	return( GetFullLanguageID() & 0x3FF );
}



unsigned int 
GetFullLanguageID()
{
	// determine language ID for localization query
	//unsigned int uiLanguage( GetUserDefaultLCID() ); // for user depended locale
	//unsigned int uiLanguage( GetSystemDefaultLCID() ); // for system depended locale
	unsigned int uiLanguage( (unsigned int) ( (size_t) GetKeyboardLayout( 0 ) ) );
	return( uiLanguage );
}



unsigned int
GetPrimarySystemLanguageID()
{
	return( GetSystemDefaultLCID() & 0x3FF );
}
