I'm working on cross-platform C++ application. It is multilingual and have to show all messages in usera language. In order to detect locale i'm using setlocale(LC_ALL, "") call. It returns current language and country, for example "ru_RU.UTF-8" in my case.
Everything works without problems in MacOS 10.9.1 when i'm launching my application from terminal. When I'm running my application from Finder, setlocale always return default locale ("C"). I suspect that's because LANG environment variable is not set by Finder.
What's correct way to detect user locale under MacOS X in C++ application?