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 | |
TY_PRIVATE Bool | TY_❪tidyGetLanguageSetByUser❫ (void) |
Indicates whether or not the current language was set by a LibTidy user or internally by the library. More... | |
TY_PRIVATE ctmbstr | TY_❪tidyGetLanguage❫ (void) |
Gets the current language used by Tidy. More... | |
TY_PRIVATE ctmbstr | TY_❪tidyLocalizedStringN❫ (uint messageType, uint quantity) |
Provides a string given messageType in the current localization for quantity . More... | |
TY_PRIVATE ctmbstr | TY_❪tidyLocalizedString❫ (uint messageType) |
Provides a string given messageType in the current localization for the single case. More... | |
TY_PRIVATE void | TY_❪tidySetLanguageSetByUser❫ (void) |
Specifies to LibTidy that the user (rather than the library) selected the current language. More... | |
TY_PRIVATE Bool | TY_❪tidySetLanguage❫ (ctmbstr languageCode) |
Tells Tidy to use a different language for output. More... | |
TY_PRIVATE tmbstr | TY_❪tidySystemLocale❫ (tmbstr result) |
Determines the current locale without affecting the C locale. More... | |
Documentation Generation | |
TY_PRIVATE TidyIterator | TY_❪getInstalledLanguageList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's list of installed language codes. More... | |
TY_PRIVATE ctmbstr | TY_❪getNextInstalledLanguage❫ (TidyIterator *iter) |
Returns the next installed language. More... | |
TY_PRIVATE uint | TY_❪getNextStringKey❫ (TidyIterator *iter) |
TY_PRIVATE const tidyLocaleMapItemImpl * | TY_❪getNextWindowsLanguage❫ (TidyIterator *iter) |
Returns the next record of type localeMapItem in Tidy's structure of Windows<->POSIX local mapping. More... | |
TY_PRIVATE TidyIterator | TY_❪getStringKeyList❫ (void) |
TY_PRIVATE TidyIterator | TY_❪getWindowsLanguageList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's structure of Windows<->POSIX local mapping. More... | |
TY_PRIVATE ctmbstr | TY_❪tidyDefaultString❫ (uint messageType) |
Provides a string given messageType in the default localization (which is en ). More... | |
TY_PRIVATE ctmbstr | TY_❪TidyLangPosixName❫ (const tidyLocaleMapItemImpl *item) |
Given a `tidyLocaleMapItemImpl, return the POSIX name. More... | |
TY_PRIVATE 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 |
TY_PRIVATE 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();
TY_PRIVATE ctmbstr TY_❪getNextInstalledLanguage❫ | ( | TidyIterator * | iter | ) |
Returns the next installed language.
TY_PRIVATE uint TY_❪getNextStringKey❫ | ( | TidyIterator * | iter | ) |
TY_PRIVATE const tidyLocaleMapItemImpl* TY_❪getNextWindowsLanguage❫ | ( | TidyIterator * | iter | ) |
Returns the next record of type localeMapItem
in Tidy's structure of Windows<->POSIX local mapping.
TY_PRIVATE TidyIterator TY_❪getStringKeyList❫ | ( | void | ) |
TY_PRIVATE 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();
TY_PRIVATE ctmbstr TY_❪tidyDefaultString❫ | ( | uint | messageType | ) |
Provides a string given messageType
in the default localization (which is en
).
TY_PRIVATE 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.
TY_PRIVATE ctmbstr TY_❪tidyGetLanguage❫ | ( | void | ) |
Gets the current language used by Tidy.
TY_PRIVATE ctmbstr TY_❪TidyLangPosixName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocaleMapItemImpl, return the POSIX name.
TY_PRIVATE ctmbstr TY_❪TidyLangWindowsName❫ | ( | const tidyLocaleMapItemImpl * | item | ) |
Given a `tidyLocaleMapItemImpl, return the Windows name.
TY_PRIVATE ctmbstr TY_❪tidyLocalizedStringN❫ | ( | uint | messageType, |
uint | quantity | ||
) |
Provides a string given messageType
in the current localization for quantity
.
TY_PRIVATE ctmbstr TY_❪tidyLocalizedString❫ | ( | uint | messageType | ) |
Provides a string given messageType
in the current localization for the single case.
TY_PRIVATE 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.
TY_PRIVATE Bool TY_❪tidySetLanguage❫ | ( | ctmbstr | languageCode | ) |
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. |
TY_PRIVATE tmbstr TY_❪tidySystemLocale❫ | ( | tmbstr | result | ) |
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. |