![]() | InDesign SDK 20.5 |
#include <ILanguage.h>

Public Types | |
| enum | { kDefaultIID = IID_ILANGUAGE } |
| enum | QuotationType { kSingle, kDouble } |
| enum | QuotationPosition { kLeft, kRight } |
Public Member Functions | |
| virtual const PMString & | GetLanguageName () const =0 |
| virtual const PMString & | GetPrimaryLanguageName () const =0 |
| virtual const PMString & | GetSubLanguageName () const =0 |
| virtual LanguageID | GetLanguageID () const =0 |
| virtual void | SetLanguageName (const PMString &rName)=0 |
| virtual void | SetPrimaryLanguageName (const PMString &rName)=0 |
| virtual void | SetSubLanguageName (const PMString &rName)=0 |
| virtual void | SetLanguageID (const LanguageID nLanguage)=0 |
| virtual void | CopyFrom (const ILanguage *pLanguage)=0 |
| virtual bool16 | IsEqual (const ILanguage *pLanguage) const =0 |
| virtual UTF32TextChar | GetQuotationMark (ILanguage::QuotationType nType, ILanguage::QuotationPosition nPosition)=0 |
| virtual bool16 | SetQuotationMarks (const QuoteEntry &newQuoteEntry)=0 |
| virtual bool16 | GetQuotationMarks (QuoteEntry &qe) const =0 |
| virtual TextIndex | FindSurroundingWord (const ITextModel *pModel, TextIndex nPosition, int32 *pLength, FuncIsWordChar aFunction) const =0 |
| virtual TextIndex | FindSurroundingWordUsingWordCharFuncOnly (const ITextModel *pModel, TextIndex nPosition, int32 *pLength, FuncIsWordChar aFunction) const =0 |
| virtual int16 | GetWritingScript () const =0 |
| virtual const char * | GetOpenTypeScriptTag () const =0 |
| virtual const char * | GetOpenTypeLanguageTag () const =0 |
| virtual bool16 | AfterHyphenationCanChange () const =0 |
| virtual int32 | LinguisticCompare (const WideString &a, const WideString &b, LanguageID aLang=0, LanguageID bLang=0, bool16 usePrefixPunctuation=kFalse) const =0 |
| virtual const OpenTypeFeatureList & | GetRequiredOTFeatureList () const =0 |
| virtual const ID_ICU_NAMESPACE::Locale & | GetICULocale () const =0 |
| virtual std::string | GetICULocaleString () const =0 |
| virtual void | SetICULocale (const ID_ICU_NAMESPACE::Locale &newLocale)=0 |
| virtual void | SetICULocale (std::string newLocale)=0 |
| virtual void | SetSpellingService (ISpellingService *spellingService)=0 |
| virtual ISpellingService * | QuerySpellingService (PMString *error=nil) const =0 |
| virtual void | SetHyphenationService (IHyphenationService *hyphenationService)=0 |
| virtual IHyphenationService * | QueryHyphenationService (PMString *error=nil) const =0 |
| virtual void | GetHyphenString (WideString &hyphenString) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The ILanguage is a persistent interface of the kLanguageBoss. It is used and referenced by the ILanguageList which is an interface of the application's and document's workspace.
| pure virtual |
AfterHyphenationCanChange returns information about hyphenation behavior for a language. Currently, only Dutch return kTrue – meaning that some words hyphenate and the piece of the word AFTER the hyphenation break can change spelling. More languages change spelling before the break, but this is only for AFTER the break.
| pure virtual |
Copies the values from a different language
| pLanguage | langauge to copy |
| pure virtual |
Find the word at a text location.
| pModel | The text model in question. |
| nPosition | The text location in question. |
| pLength | OUT the length of the word. |
| aFunction | a function that determines what characters are considered word breaking. |
| pure virtual |
Find the word at a text location.
| pModel | The text model in question. |
| nPosition | The text location in question. |
| pLength | OUT the length of the word. |
| aFunction | a function that determines what characters are considered word breaking. |
| pure virtual |
Get string to use when hyphenating word. For most languages this is just kTextChar_HyphenMinus
| hyphenString | string to use when hyphenating a word |
| pure virtual |
Get locale to pass to ICU routines. See - http://icu.sourceforge.net/userguide/locale.html
| pure virtual |
Get ICU locale string by calling Locale.getName().
| pure virtual |
Returns the LanguageID that classifies this language.
If you need a unique identifier use GetLanguageName(). Language IDs are a convience to check things like - GetPrimaryLanguageID(language->GetLanguageID()) == kLanguageDutch
| pure virtual |
Gets the full language name i.e.: "English: US". This name needs to be unique. It is the identifier for a language.
| pure virtual |
Gets the OpenType language tag for the language.
See - http://partners.adobe.com/public/developer/opentype/index_tag2.html
| pure virtual |
Gets the OpenType script tag for the language.
See - http://partners.adobe.com/public/developer/opentype/index_tag1.html
| pure virtual |
Gets the primary language name i.e.: "English".
| pure virtual |
Returns the unicode value corresponding to the quote given the type and position.
| nType | QuotationType (kDouble/kSingle), |
| nPosition | QuotationPosition (kLeft/kRight) |
| pure virtual |
| pure virtual |
Get OpenType features required to render this language.
| pure virtual |
Gets the sub language name i.e.: "US".
| pure virtual |
Gets the writing script of the language
| pure virtual |
Language names are equal. Does not compare settings in the language like quotes
| pure virtual |
Compares using language. Uses ICU locale and ICU collator to compare. See - http://icu.sourceforge.net/userguide/Collate_Intro.html
| a | string to compare |
| b | string to compare |
| usePrefixPunctuation | controls whether "!B" sorts before "A" or after. Before = use punctuation. |
| aLang | language of a. currently not used |
| bLang | language of b. currently not used |
| pure virtual |
Query for hyphenation service for this language
| error | Name of missing hyphenation Provider. If this sting is empty and return in nil then this language did not have a hyphenation service and should not be considered an error. For example Japanese does not have a hyphenation service. |
| pure virtual |
Query for spelling service for this language
| error | Name of missing spelling Provider. If this sting is empty and return in nil then this language did not have a spelling service and should not be considered an error. For example Japanese does not have a spelling service. |
| pure virtual |
Set for hyphenation service for this language
| hyphenationService | hyphenation service to set for language |
| pure virtual |
Set locale to be used by routines like LinguisticCompare. SetLanguageID will overwrite the ICULocale so make sure you set it after calling SetLanguageID.
| Locale | ICU locale |
| pure virtual |
Set locale to be used by routines like LinguisticCompare. SetLanguageID will overwrite the ICULocale so make sure you set it after calling SetLanguageID.
| Locale | ICU locale |
| pure virtual |
Sets the LanguageID that classifies this language.
Language IDs should not be used as an unique identifier. Use language name.
| nLanguage | lanaguage id. |
| pure virtual |
Sets the full language name i.e.: "English: US"
| rName | The full language name i.e.: "English: US" |
| pure virtual |
Sets the primary language name i.e.: "English".
| rName | The primary language name i.e.: "English". |
| pure virtual |
| pure virtual |
Set for spelling service for this language
| spellingService | spelling service to set for language |
| pure virtual |
Sets the sub language name i.e.: "US".
| rName | The sub language name i.e.: "US". |