Reference · Marking, scores and game rules
kotobaLanguagefunction
The language a person asked for, by en or ja or a tag that begins with one: English for anything else.
Import it
import { kotobaLanguage } from "@johnmorrisdotca/kotoba";
Definition
function kotobaLanguage(tag: string | undefined): Language
Parameters
| Name | Type | Description |
|---|---|---|
tag | string | undefined | A language tag, or undefined to select English. |
Returns
Language
The language a person asked for, by en or ja or a tag that begins with one: English for anything else.
Examples
import { kotobaLanguage } from "@johnmorrisdotca/kotoba";
console.log(kotobaLanguage("ja-JP"));jaWhat it prints (run when this page was built)