Go to the source code of this file.
Data Structures | |
struct | languageDefinition |
Finally, a complete language definition. More... | |
struct | languageDictionaryEntry |
Describes a record for a localization string. More... | |
struct | tidyLocaleMapItemImpl |
The function getNextWindowsLanguage() returns pointers to this type; it gives LibTidy implementors the ability to determine how Windows locale names are mapped to POSIX language codes. More... | |
Functions | |
Localization Related Functions | |
Bool | TY_❪tidyGetLanguageSetByUser❫ (void) |
Indicates whether or not the current language was set by a LibTidy user or internally by the library. More... | |
ctmbstr | TY_❪tidyGetLanguage❫ (void) |
Gets the current language used by Tidy. More... | |
ctmbstr | TY_❪tidyLocalizedStringN❫ (uint messageType, uint quantity) |
Provides a string given messageType in the current localization for quantity . More... | |
ctmbstr | TY_❪tidyLocalizedString❫ (uint messageType) |
Provides a string given messageType in the current localization for the single case. More... | |
void | TY_❪tidySetLanguageSetByUser❫ (void) |
Specifies to LibTidy that the user (rather than the library) selected the current language. More... | |
Bool | TY_❪tidySetLanguage❫ (ctmbstr languageCode) |
Tells Tidy to use a different language for output. More... | |
tmbstr | TY_❪tidySystemLocale❫ (tmbstr result) |
Determines the current locale without affecting the C locale. More... | |
Documentation Generation | |
TidyIterator | TY_❪getInstalledLanguageList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's list of installed language codes. More... | |
ctmbstr | TY_❪getNextInstalledLanguage❫ (TidyIterator *iter) |
Returns the next installed language. More... | |
uint | TY_❪getNextStringKey❫ (TidyIterator *iter) |
const tidyLocaleMapItemImpl * | TY_❪getNextWindowsLanguage❫ (TidyIterator *iter) |
Returns the next record of type localeMapItem in Tidy's structure of Windows<->POSIX local mapping. More... | |
TidyIterator | TY_❪getStringKeyList❫ (void) |
TidyIterator | TY_❪getWindowsLanguageList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's structure of Windows<->POSIX local mapping. More... | |
ctmbstr | TY_❪tidyDefaultString❫ (uint messageType) |
Provides a string given messageType in the default localization (which is en ). More... | |
ctmbstr | TY_❪TidyLangPosixName❫ (const tidyLocaleMapItemImpl *item) |
Given a `tidyLocaleMapItemImpl, return the POSIX name. More... | |
ctmbstr | TY_❪TidyLangWindowsName❫ (const tidyLocaleMapItemImpl *item) |
Given a `tidyLocaleMapItemImpl, return the Windows name. More... | |
Exposed Data Structures | |
typedef languageDictionaryEntry const | languageDictionary[600] |
For now we'll just use an array to hold all of the dictionary entries. More... | |
enum | tidyLanguage { TIDY_LANGUAGE = 400, TIDY_MESSAGE_TYPE_LAST } |
These enumerations are used within instances of languageDefinition structures to provide additional metadata, and are localizable therein. More... | |
struct languageDictionaryEntry |
Describes a record for a localization string.
tidyMessageTypes
below)Data Fields | ||
---|---|---|
uint | key | |
uint | pluralForm | |
ctmbstr | value |
struct tidyLocaleMapItemImpl |
The function getNextWindowsLanguage() returns pointers to this type; it gives LibTidy implementors the ability to determine how Windows locale names are mapped to POSIX language codes.
Data Fields | ||
---|---|---|
ctmbstr | POSIXName | |
ctmbstr | winName |
typedef languageDictionaryEntry const languageDictionary[600] |
For now we'll just use an array to hold all of the dictionary entries.
In the future we can convert this to a hash structure which will make looking up strings faster.
enum tidyLanguage |
These enumerations are used within instances of languageDefinition
structures to provide additional metadata, and are localizable therein.
Enumerator | |
---|---|
TIDY_LANGUAGE | |
TIDY_MESSAGE_TYPE_LAST |
TidyIterator TY_❪getInstalledLanguageList❫ | ( | void | ) |
Initializes the TidyIterator to point to the first item in Tidy's list of installed language codes.
Items can be retrieved with getNextInstalledLanguage();
ctmbstr TY_❪getNextInstalledLanguage❫ | ( | TidyIterator * | iter | ) |
Returns the next installed language.
uint TY_❪getNextStringKey❫ | ( | TidyIterator * | iter | ) |
const tidyLocaleMapItemImpl* TY_❪getNextWindowsLanguage❫ | ( | TidyIterator * | iter | ) |
Returns the next record of type localeMapItem
in Tidy's structure of Windows<->POSIX local mapping.
TidyIterator TY_❪getStringKeyList❫ | ( | void | ) |
TidyIterator TY_❪getWindowsLanguageList❫ | ( | void | ) |
Initializes the TidyIterator to point to the first item in Tidy's structure of Windows<->POSIX local mapping.
Items can be retrieved with getNextWindowsLanguage();
Provides a string given messageType
in the default localization (which is en
).
Bool TY_❪tidyGetLanguageSetByUser❫ | ( | void | ) |
Indicates whether or not the current language was set by a LibTidy user or internally by the library.
This flag prevents subsequently created instances of TidyDocument from changing the user's language.
ctmbstr TY_❪tidyGetLanguage❫ | ( | void | ) |
Gets the current language used by Tidy.
ctmbstr TY_❪TidyLangPosixName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocaleMapItemImpl, return the POSIX name.
ctmbstr TY_❪TidyLangWindowsName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocaleMapItemImpl, return the Windows name.
Provides a string given messageType
in the current localization for quantity
.
Provides a string given messageType
in the current localization for the single case.
void TY_❪tidySetLanguageSetByUser❫ | ( | void | ) |
Specifies to LibTidy that the user (rather than the library) selected the current language.
This flag prevents subsequently created instances of TidyDocument from changing the user's language.
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. |
Determines the current locale without affecting the C locale.
Tidy has always used the default C locale, and at this point in its development we're not going to tamper with that.
result | The buffer to use to return the string. Returns NULL on failure. |