These functions help manage localization in Tidy.
Data Structures | |
struct | tidyLocalMapItem |
Represents an opaque type we can use for tidyLocaleMapItem, which is used to iterate through the language list, and used to access the windowsName() and the posixName(). More... | |
Tidy's Locale | |
Bool TIDY_CALL | tidySetLanguage (ctmbstr languageCode) |
Tells Tidy to use a different language for output. More... | |
ctmbstr TIDY_CALL | tidyGetLanguage (void) |
Gets the current language used by Tidy. More... | |
Locale Mappings | |
TidyIterator TIDY_CALL | getWindowsLanguageList (void) |
Initiates an iterator for a list of Tidy's Windows<->POSIX locale mappings. More... | |
const tidyLocaleMapItem *TIDY_CALL | getNextWindowsLanguage (TidyIterator *iter) |
Given a valid TidyIterator initiated with getWindowsLanguageList(), returns a pointer to a tidyLocaleMapItem, which can be further interrogated with TidyLangWindowsName() or TidyLangPosixName(). More... | |
const ctmbstr TIDY_CALL | TidyLangWindowsName (const tidyLocaleMapItem *item) |
Given a tidyLocalMapItem , return the Windows name. More... | |
const ctmbstr TIDY_CALL | TidyLangPosixName (const tidyLocaleMapItem *item) |
Given a tidyLocalMapItem , return the POSIX name. More... | |
Getting Localized Strings | |
ctmbstr TIDY_CALL | tidyLocalizedStringN (uint messageType, uint quantity) |
Provides a string given messageType in the current localization for quantity . More... | |
ctmbstr TIDY_CALL | tidyLocalizedString (uint messageType) |
Provides a string given messageType in the current localization for the single case. More... | |
ctmbstr TIDY_CALL | tidyDefaultString (uint messageType) |
Provides a string given messageType in the default localization (which is en ). More... | |
TidyIterator TIDY_CALL | getStringKeyList (void) |
Initiates an iterator for a list of string key codes available in Tidy. More... | |
uint TIDY_CALL | getNextStringKey (TidyIterator *iter) |
Given a valid TidyIterator initiated with getStringKeyList(), returns an unsigned integer representing the next key value. More... | |
Available Languages | |
TidyIterator TIDY_CALL | getInstalledLanguageList (void) |
Initiates an iterator for a list of Tidy's installed languages. More... | |
ctmbstr TIDY_CALL | getNextInstalledLanguage (TidyIterator *iter) |
Given a valid TidyIterator initiated with getInstalledLanguageList(), returns a string representing a language name that is installed in Tidy. More... | |
struct tidyLocalMapItem |
Represents an opaque type we can use for tidyLocaleMapItem, which is used to iterate through the language list, and used to access the windowsName() and the posixName().
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:
Given a valid TidyIterator initiated with getInstalledLanguageList(), returns a string representing a language name that is installed in Tidy.
iter | The TidyIterator (initiated with getInstalledLanguageList()) token. |
Given a valid TidyIterator initiated with getStringKeyList(), returns an unsigned integer representing the next key value.
iter | The TidyIterator (initiated with getStringKeyList()) token. |
const tidyLocaleMapItem* TIDY_CALL getNextWindowsLanguage | ( | TidyIterator * | iter | ) |
Given a valid TidyIterator initiated with getWindowsLanguageList(), returns a pointer to a tidyLocaleMapItem, which can be further interrogated with TidyLangWindowsName() or TidyLangPosixName().
iter | The TidyIterator (initiated with getWindowsLanguageList()) token. |
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:
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:
Provides a string given messageType
in the default localization (which is en
).
messageType | The message type. |
Gets the current language used by Tidy.
Given a tidyLocalMapItem
, return the POSIX name.
item | An instance of tidyLocalMapItem to query. |
Given a tidyLocalMapItem
, return the Windows name.
item | An instance of tidyLocalMapItem to query. |
Provides a string given messageType
in the current localization for the single case.
messageType | The message type. |
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.
messageType | The message type. |
quantity | The quantity. |
Tells Tidy to use a different language for output.
languageCode | A Windows or POSIX language code, and must match a TIDY_LANGUAGE for an installed language. |