Reference · Cube engine and views
languageOffunction
The language a tag names, as far as the package speaks it: anything beginning "ja" is Japanese, and the rest is English.
Import it
import { languageOf } from "@johnmorrisdotca/kyuubu";
Definition
function languageOf(tag: string | null | undefined): KyuubuLanguage
Parameters
| Name | Type | Description |
|---|---|---|
tag | string | null | undefined | The language tag to read. |
Returns
KyuubuLanguage
The language a tag names, as far as the package speaks it: anything beginning "ja" is Japanese, and the rest is English.
Examples
import { languageOf } from "@johnmorrisdotca/kyuubu";
console.log(languageOf("ja-JP"));jaWhat it prints (run when this page was built)