Wrong System Language Recognized

The function info(“languagecode”) returns the language code for the current location. This is a two letter code, for example en, fr, de etc. The result of this function will immediately reflect any changes made in the System Preferences Language & Region panel.

I am living in Germany, and my Mac is set up accordingly.

The function info(“languagecode”) gives me an unexpected result: “en” instead of “de”.

FWIW: The similar function info(“countrycode”) delivers the correct result “DE”.

Panorama is using the same API to find out from the system what the current language code and country code. But I have no access to a system with multiple languages, so I had no way to test this. I just assumed that the same API would work.

On receipt of your report, I did some digging. It turns out this is quite complicated and is confusing to many developers.

If I am reading this correctly, the API that Panorama is using now will only return a language that the application is localized in. Since Panorama is only localized in English, it always returns English. Of course that’s pretty useless!

Based on suggestions on this Stack Overflow post, I have changed to a different API. However, I still have no way to test this on a non-English system. It does correctly return “en” on my system. When you get your hands on the next version, please test this and let me know if it now correctly returns “de” on your system.