Skip to the content

Chizu地図

Draw SVG maps, frame regions, place numbered callouts and build geography quizzes with English and Japanese names.

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · Framing, geometry and quiz tools

chizuLanguageOffunction

A language this package has words for, from a tag such as ja-JP or en: Japanese for any ja, English otherwise.

Import it

import { chizuLanguageOf } from "@johnmorrisdotca/chizu";

Definition

function chizuLanguageOf(tag: string | undefined | null): ChizuLanguage

Parameters

NameTypeDescription
tagstring | null | undefined

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

Returns

ChizuLanguage

A language this package has words for, from a tag such as ja-JP or en: Japanese for any ja, English otherwise.

Examples

import { chizuLanguageOf } from "@johnmorrisdotca/chizu";

console.log(chizuLanguageOf("ja-JP"), chizuLanguageOf("fr"), chizuLanguageOf(undefined));
// ja en en
ja en en

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.5.0.