MLang Objects
The following articles describe the objects that are exposed by MLang.
Code Page Enumeration |
The Code Page Enumeration Object is created by the IMultiLanguage::EnumCodePages method. This method creates an instance of this object, initializes it with a combination of the flags defined by the MIMECONTF enumerated type, and retrieves the corresponding IEnumCodePage interface (the only interface this object supports). A client can then retrieve a list of all the code pages the system recognizes that fit the specified flags through a call to IEnumCodePage::Next. The Code Page Enumeration Object maintains the position of the client in the enumeration sequence. This position is advanced through calls to the IEnumCodePage::Next or IEnumCodePage::Skip method and can be reset to the beginning of the enumeration sequence through calls to the IEnumCodePage::Reset method. |
Conversion |
The Conversion Object is a conversion engine dedicated to a specified combination of source and destination code pages. Using this object, a client can perform multiple conversions from the source code page to the destination code page more efficiently than by calling the conversion methods in the IMultiLanguage interface. To avoid creating and deleting many instances of the Conversion Object, callers can reinitialize any such object whenever a change in code pages is needed.A client should use this object to perform a number of conversions between the same two code pages. |
Locale Enumeration |
The Locale Enumeration Object is created by the IMultiLanguage::EnumRfc1766 method. The only interface this object supports is the IEnumRfc1766 interface. Through a call to IEnumRfc1766::Next, a client creates an enumeration sequence of RFC1766INFO structures and retrieves a specified number of them. The object maintains the position of the client in the enumeration sequence. This position can be advanced through calls to IEnumRfc1766::Next or IEnumRfc1766::Skip and can be reset to the beginning of the enumeration sequence through calls to IEnumRfc1766::Reset. |
MultiLanguage |
The MultiLanguage Object is the primary MLang object. It provides access to all other objects and interfaces implemented by MLang. The MultiLanguage Object supports four interfaces that provide the following set of services:- Retrieving code page and locale information from the registry.
- Converting between different code pages.
- Determining the code pages to which a given character or set of characters belongs.
- Creating custom fonts to display characters from multiple code pages.
- Determining where a line break should occur based on the given locale.
In addition, the MultiLanguage Object provides access to the Code Page Enumeration Object, the Locale Enumeration Object, and the Conversion Object, each of which provides a more specialized set of services to the client. |