Hi
In the latest version of JUCE SystemStats::getDisplayLanguage() and SystemStats::getUserLanguage() are not getting the preferred language of the user in Windows 10 or 11.
getUserLanguage() is getting the locale and getDisplayLanguage() is displaying the installed languages of the operating system (Windows display language).
More info at: https://stackoverflow.com/a/73551640
In Windows the language settings for Apps look like this:
So in my opinion this is the value that SystemStats::getUserLanguage() should return. This value can be retrieved with the following code:
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.System.UserProfile.h>
#pragma comment(lib, "windowsapp")
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::System::UserProfile;
for (const auto& lang : GlobalizationPreferences::Languages())
{
language_code = String(lang.c_str());
break;
}

