·
1 min read

Changing the language at runtime in X++

We recently had a case where the customer wanted to change the language being used for a given AX user at runtime.  The customer had sorted out how to change the language displayed in forms and reports but the buttons on the navigation pane were not getting updated.  Here is a way to handle this scenario:

In the setSetup method of the SysUserSetup form within the if clause add the following:

        if (infolog.language() != userinfo.language)
        {
            infolog.language(userinfo.language);
            infolog.navPane().loadStartupButtons();
        }