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 | |
tmbstr | TY_❪tidySystemLocale❫ (tmbstr result) |
Determines the current locale without affecting the C locale. More... | |
Bool | TY_❪tidySetLanguage❫ (ctmbstr languageCode) |
Tells Tidy to use a different language for output. More... | |
ctmbstr | TY_❪tidyGetLanguage❫ (void) |
Gets the current language used by Tidy. More... | |
Bool | TY_❪tidyGetLanguageSetByUser❫ (void) |
Indicates whether or not the current language was set by a LibTidy user or internally by the library. More... | |
void | TY_❪tidySetLanguageSetByUser❫ (void) |
Specifies to LibTidy that the user (rather than the library) selected the current language. 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... | |
Documentation Generation | |
ctmbstr | TY_❪tidyDefaultString❫ (uint messageType) |
Provides a string given messageType in the default localization (which is en ). More... | |
TidyIterator | TY_❪getStringKeyList❫ (void) |
uint | TY_❪getNextStringKey❫ (TidyIterator *iter) |
TidyIterator | TY_❪getWindowsLanguageList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's structure of Windows<->POSIX local mapping. More... | |
const tidyLocaleMapItemImpl * | TY_❪getNextWindowsLanguage❫ (TidyIterator *iter) |
Returns the next record of type localeMapItem in Tidy's structure of Windows<->POSIX local mapping. More... | |
const ctmbstr | TY_❪TidyLangWindowsName❫ (const tidyLocaleMapItemImpl *item) |
Given a `tidyLocalMapItemImpl, return the Windows name. More... | |
const ctmbstr | TY_❪TidyLangPosixName❫ (const tidyLocaleMapItemImpl *item) |
Given a `tidyLocalMapItemImpl, return the POSIX name. More... | |
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... | |
Exposed Data Structures | |
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... | |
typedef languageDictionaryEntry const | languageDictionary[600] |
For now we'll just use an array to hold all of the dictionary entries. 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.
const ctmbstr TY_❪TidyLangPosixName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocalMapItemImpl, return the POSIX name.
const ctmbstr TY_❪TidyLangWindowsName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocalMapItemImpl, 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. |