3ds Max C++ API Reference
|
3ds Max provides APIs that help render correctly and consistently locale (region) specific information such as floating point numbers, date and time. More...
Classes | |
class | MaxLocaleHandler |
Helper class for setting locale temporarily. More... | |
Functions | |
UtilExport const _locale_t & | GetCNumericLocale () |
Returns a C numeric locale specification. More... | |
UtilExport const _locale_t & | GetUserLocale () |
Returns the user locale cached at the start of 3ds Max. More... | |
3ds Max provides APIs that help render correctly and consistently locale (region) specific information such as floating point numbers, date and time.
Use the GetUserLocale() API to facilitate displaying floating point, date and time values in 3ds Max's user interface. These need to respect the current locale settings, i.e. the current user's regional preferences. Use GetCNumericLocale() or class MaxLocaleHandler to read and write data to text files in a locale independent format, such as a minimal ANSI conforming environment for C translation, known as "C" locale
UtilExport const _locale_t& GetCNumericLocale | ( | ) |
Returns a C numeric locale specification.
This method should be used when writing or reading locale independent data to or from a file. Floating point values need to be stored in a locale independent representation in order to allow them to be used on computers using different locales or regional settings, i.e. they must always be written, read or formatted using dot ('.') as decimal separator. The locale object returned by this function can be used with APIs that use a locale parameter to interpret the data they read, write or format. Examples of such APIs are: _stscanf_l(), _sntprintf_s_l(), TSTR::printf_l(), BaseTextReader::Printf_l(), etc
..
When you need to read and write date and time values in a local independent way, use class MaxLocaleHandler.
UtilExport const _locale_t& GetUserLocale | ( | ) |
Returns the user locale cached at the start of 3ds Max.
This method should be used when displaying data whose representation is dependent on regional settings in the user interface. For example, when displaying floating point numbers in the UI while the current regional settings are French, the user expects the decimal separator to be ','.
..
When you need to read and write date and time values in a local independent way, use class MaxLocaleHandler, or GetCNumericLocale().