1

I need to see the code under the class xLanguage. In order to understand how to get the Language Description,

xLanguage::languageID2Description(str languageID) // method
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
ulisses
  • 1,549
  • 3
  • 37
  • 85

1 Answers1

3

That's a Kernel function, so you can't see the source code (practically).

Languages can be added/removed so I suspect it retrieves that description via the actual filesystem (likely somewhere in C:\Program Files\Microsoft Dynamics AX\60\Server\[aos_name]\bin\Application\Appl\Standard) OR it's stored somewhere in the modelstore database.

If you are asking to see the code for the purposes of simply retrieving Description for some other purpose (external system?), then the simplest thing would be to just create your own static table and load languages/descriptions into it for retrieval.

LanguageTable       languageTable;
MyTable             myTable;

ttsBegin;
while select languageTable
{
    myTable.languageId  = languageTable.LanguageId;
    myTable.description = languageTable.languageDescription();
    myTable.insert();
    info(strFmt("Inserting %1: %2", languageTable.LanguageId, languageTable.languageDescription()));
}
ttsCommit;
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
  • 2
    Also see the [documentation](https://learn.microsoft.com/en-us/previous-versions/dynamics/ax-2012/system-classes/gg949085(v=ax.60)) – FH-Inway Jan 15 '19 at 16:39
  • Thanks @FH-Inway for your extra info. – ulisses Jan 21 '19 at 14:45
  • Thanks @Alex Kwitny, there is any way to check the Language Description stored? – ulisses Jan 21 '19 at 14:46
  • 2
    @ulisses I don't think so practically. That's why I said to create your own custom table and just load it once and use it for reference. Languages/descriptions aren't really ever changing except maybe by AX version. The description could be stored in a varbinary field that you could maybe interpret, similar to how this guy did it (second answer) https://stackoverflow.com/questions/54206405/what-are-the-possible-values-and-text-description-for-batch-job-status-in-ax-201 . – Alex Kwitny Jan 21 '19 at 15:58
  • Thanks @Alex Kwitny – ulisses Jan 24 '19 at 09:12