Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

Reference · Streams, draws and seeds

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/tane";

Definition

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

Parameters

NameTypeDescription
tagstring | null | undefined

The language tag to interpret.

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/tane";

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.