languageOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The language a tag names, as far as the package speaks it: anything beginning "ja" is Japanese, and the rest is English.
インポート
import { languageOf } from "@johnmorrisdotca/kyuubu";
定義
function languageOf(tag: string | null | undefined): KyuubuLanguage
引数
| 名前 | 型 | 説明 |
|---|---|---|
tag | string | null | undefined | The language tag to read. |
戻り値
KyuubuLanguage
The language a tag names, as far as the package speaks it: anything beginning "ja" is Japanese, and the rest is English.
例
import { languageOf } from "@johnmorrisdotca/kyuubu";
console.log(languageOf("ja-JP"));ja出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。