xLanguage Class
The xLanguage class provides access to a list of language IDs and information about existing label files.
Syntax
class xLanguage extends Object
Run On
Called
Methods
Method | Description | |
---|---|---|
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
new | Initializes a new instance of the Object class. (Inherited from Object.) | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
toString | Returns a string that represents the current object. (Inherited from Object.) | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::index2languageID | Retrieves the language ID (for example, "en-us") of the specified language. | |
::labelFileCount | Returns the number of label files. | |
::labelFileNumber2LanguageID | ||
::languageCount | ||
::languageID2Description | Returns the name of the specified language (for example, "English (United States)"), given the language ID. | |
::languageID2LCID | ||
::lcid2languageID |
Top
Remarks
ISO 639 defines the names of languages, such as "en" for English.
Microsoft has listed a set of language codes, such "en-us" for English (United States). These language codes are referred to in Microsoft Dynamics AX as Language IDs.
Microsoft Dynamics AX uses "ko-jo" for Korean (Johab). In the Microsoft list, "ko" is both Korean and Korean (Johab).
Microsoft Dynamics AX uses "no-ny" for Norwegian (Nynorsk). In the Microsoft list, "no" is both Norwegian (Bokmal) and Norwegian (Nynorsk).
Microsoft Dynamics AX uses "es-tr" to represent Spanish (Spain - Traditional Sort). In the Microsoft list, "es" is both Spanish (Spain - Modern Sort) and Spanish (Spain - Traditional Sort).
A language name in the following format, such as "English (United States)", is referred to as the description in Microsoft Dynamics AX.
Examples
The following example prints all the language IDs from the Microsoft list and a list of existing label files.
static void aaaTestLanguage(args a)
{
int i;
int cnt;
str languageID;
str description;
str shortName;
cnt = xlanguage::languageCount();
for (i = 0; i<=cnt; i++)
{
languageID =xLanguage::index2languageID(i);
print "Language ", i, ":", languageID, ":";
}
cnt = xLanguage::labelFileCount();
for (i = 0; i<=cnt; i++)
{
shortName =xLanguage::labelFileNumber2LanguageID(i);
languageID =xLanguage::index2languageID(i);
description = xLanguage::languageID2Description(languageID);
print i, ":", shortName, ":", description;
}
pause;
}
Inheritance Hierarchy
Object Class
xLanguage Class