Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Games and state

languageOffunction

The language a tag such as ja-JP or en_US.UTF-8 names: Japanese for anything that starts ja, English otherwise.

Import it

import { languageOf } from "@johnmorrisdotca/toranpu";

Definition

function languageOf(tag: string | null | undefined): Language

Parameters

NameTypeDescription
tagstring | null | undefined

The language tag or custom-element tag specified by the call.

Returns

Language

The language a tag such as ja-JP or en_US.UTF-8 names: Japanese for anything that starts ja, English otherwise.

Examples

import { languageOf } from "@johnmorrisdotca/toranpu";

console.log(languageOf("ja-JP"));
ja

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.