My recent project was a console application which need to work in both Japanese and in English.
here I had to write a text to console, and this text differs based on the locale().In this situation I need to find the current system locale and do actions correspondingly.
Here I will explain how we can read system locale in c++
string locale = setlocale(LC_ALL, "");//this function sets applications locale to current system locale
cout<<"default locale:"<<locale;
if (sLocale == "Japanese_Japan.932")
{
//Do actions
}else
{
//Do actions
}