Using function setlocale (int category, const char *locale)
will set the locale in my application, and then the whole system will use this new locale.

why the whole system can get the new locale data from this new locale?

They are in the different process.