Get User, Company and System Language via X++ in AX 2012

In this quick post I want to show you how to get the actual user language, the language of the current company and the system language in AX 2012 via X++.

Languages in AX 2012

To get the actual company language you can call the static method languageId from the CompanyInfo table, which will return a LanguageId. (CompanyInfo::languageId РMSDN)

The users language can be retrieved by creating a new xInfo object and call the language method. Actually this will return the GUI language setting. It will also take a string parameter to update the actual language. (xInfo.language() – MSDN)

To get the system language we can use the SystemParameters table and use the static method getSystemLanguageId to retrieve the SystemLanguageId. (SystemParameters::getSystemLanguageId РMSDN)

This infolog shows the result of the small job from above.
Get User, Company and System Language in AX2012

You may also like...