Instance Method インスタンスメソッド

registerLanguage(_:byVendor:)

Notifies the receiver of a language your spelling checker can check. あなたのスペルチェッカーが検査できる言語のレシーバに通知します。

Declaration 宣言

func registerLanguage(_ language: String?, 
             byVendor vendor: String?) -> Bool

Parameters パラメータ

language

A string specifying the English name of a language on Apple’s list of languages. Appleのもつ言語のリスト上でのある言語の英語名を指定している文字列。

vendor

A string that identifies the vendor (to distinguish your spelling checker from those that others may offer for the same language). ベンダを識別する文字列(あなたのスペルチェッカを、他のものが同じ言語に提示するかもしれないものと区別するために)

Return Value 戻り値

Returns true if the language is registered, false if for some reason it can’t be registered. 言語が登録されるならばtrue、何らかの理由のためにそれが登録されることができないfalse

Discussion 議論

If your spelling checker supports more than one language, it should invoke this method once for each language. Registering a language-vendor combination causes it to appear in the Spelling panel’s pop-up menu of spelling checkers. あなたのスペルチェッカーが1つの言語より多くサポートするならば、それはこのメソッドを各言語に対して一度だけ発動するべきです。ある言語-ベンダの組み合わせを登録することは、それをスペルチェッカーのSpellingパネルのポップアップメニューに現れるようにします。

See Also 参照

Providing Spelling Services スペルサービスを提供する