These functions help manage localization in Tidy.
◆ tidyLocaleMapItem
◆ getInstalledLanguageList()
TidyIterator TIDY_CALL getInstalledLanguageList |
( |
void | | ) |
|
Initiates an iterator for a list of Tidy's installed languages.
This iterator allows you to iterate through this list. In order to iterate through the list, initiate the iterator with this function, and then use use getNextInstalledLanguage() to retrieve the first and subsequent strings. For example:
while ( itList ) {
}
ctmbstr TIDY_CALL getNextInstalledLanguage(TidyIterator *iter)
Given a valid TidyIterator initiated with getInstalledLanguageList(), returns a string representing a...
TidyIterator TIDY_CALL getInstalledLanguageList(void)
Initiates an iterator for a list of Tidy's installed languages.
- Returns
- Returns a TidyIterator, which is a token used to represent the current position in a list within LibTidy.
◆ getNextInstalledLanguage()
Given a valid TidyIterator initiated with getInstalledLanguageList(), returns a string representing a language name that is installed in Tidy.
- Parameters
-
- Returns
- Returns a string indicating the installed language.
◆ getNextStringKey()
Given a valid TidyIterator initiated with getStringKeyList(), returns an unsigned integer representing the next key value.
- Parameters
-
- Returns
- Returns a message code.
◆ getNextWindowsLanguage()
◆ getStringKeyList()
TidyIterator TIDY_CALL getStringKeyList |
( |
void | | ) |
|
Initiates an iterator for a list of string key codes available in Tidy.
This iterator allows you to iterate through all of the codes. In order to iterate through the codes, initiate the iterator with this function, and then use getNextStringKey() to retrieve the first and subsequent codes. For example:
while ( itKey ) {
}
uint TIDY_CALL getNextStringKey(TidyIterator *iter)
Given a valid TidyIterator initiated with getStringKeyList(), returns an unsigned integer representin...
TidyIterator TIDY_CALL getErrorCodeList(void)
Initiates an iterator for a list of message codes available in Tidy.
- Returns
- Returns a TidyIterator, which is a token used to represent the current position in a list within LibTidy.
◆ getWindowsLanguageList()
TidyIterator TIDY_CALL getWindowsLanguageList |
( |
void | | ) |
|
Initiates an iterator for a list of Tidy's Windows<->POSIX locale mappings.
This iterator allows you to iterate through this list. In order to iterate through the list, initiate the iterator with this function, and then use getNextWindowsLanguage() to retrieve the first and subsequent codes. For example:
while ( itList ) {
}
const tidyLocaleMapItem *TIDY_CALL getNextWindowsLanguage(TidyIterator *iter)
Given a valid TidyIterator initiated with getWindowsLanguageList(), returns a pointer to a tidyLocale...
TidyIterator TIDY_CALL getWindowsLanguageList(void)
Initiates an iterator for a list of Tidy's Windows<->POSIX locale mappings.
Represents an opaque type we can use for tidyLocaleMapItem, which is used to iterate through the lang...
- Returns
- Returns a TidyIterator, which is a token used to represent the current position in a list within LibTidy.
◆ tidyDefaultString()
Provides a string given messageType
in the default localization (which is en
).
- Parameters
-
messageType | The message type. |
- Returns
- Returns the desired string.
◆ tidyGetLanguage()
Gets the current language used by Tidy.
- Returns
- Returns a string indicating the currently set language.
◆ TidyLangPosixName()
Given a tidyLocaleMapItem
, return the POSIX name.
- Parameters
-
- Returns
- Returns a string with the POSIX name of the mapping.
◆ TidyLangWindowsName()
Given a tidyLocaleMapItem
, return the Windows name.
- Parameters
-
- Returns
- Returns a string with the Windows name of the mapping.
◆ tidyLocalizedString()
Provides a string given messageType
in the current localization for the single case.
- Parameters
-
messageType | The message type. |
- Returns
- Returns the desired string.
◆ tidyLocalizedStringN()
Provides a string given messageType
in the current localization for quantity
.
Some strings have one or more plural forms, and this function will ensure that the correct singular or plural form is returned for the specified quantity.
- Returns
- Returns the desired string.
- Parameters
-
messageType | The message type. |
quantity | The quantity. |
◆ tidySetLanguage()
Tells Tidy to use a different language for output.
- Parameters
-
languageCode | A Windows or POSIX language code, and must match a TIDY_LANGUAGE for an installed language. |
- Returns
- Indicates that a setting was applied, but not necessarily the specific request, i.e., true indicates a language and/or region was applied. If es_mx is requested but not installed, and es is installed, then es will be selected and this function will return true. However the opposite is not true; if es is requested but not present, Tidy will not try to select from the es_XX variants.