Skip to the content

Dominoドミノ

Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.

Domino is the Japanese borrowed word ドミノ for dominoes. About the name

Contents

Reference · Tiles, Mexican Train and replay

cliLanguagefunction

The language the command line speaks: --lang, or the environment's, or the system's; Japanese for ja…, English for anything else.

Import it

import { cliLanguage } from "@johnmorrisdotca/domino";

Definition

function cliLanguage(flag: string | undefined, env?: Record<string, string | undefined>, locale?: string): Language

Parameters

NameTypeDescription
flagstring | undefined

The explicit CLI language flag, if supplied.

env (optional)Record<string, string | undefined>

Language environment values, including LC_ALL, LC_MESSAGES and LANG.

locale (optional)string | undefined

The system locale used when no environment language is supplied.

Returns

Language

The language the command line speaks: --lang, or the environment's, or the system's; Japanese for ja…, English for anything else.

Examples

import { cliLanguage } from "@johnmorrisdotca/domino";

console.log(cliLanguage(undefined,{LANG:"ja_JP.UTF-8"},"en-US"));
ja

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/domino 1.1.4.