Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · Country and region names

NameLanguagetype

The languages a flag's place is named in.

Import it

import type { NameLanguage } from "@johnmorrisdotca/hata/names";

Definition

type NameLanguage = "en" | "ja";

Examples

import { flagName, type NameLanguage } from "@johnmorrisdotca/hata/names";

const lang: NameLanguage = navigator.language.startsWith("ja") ? "ja" : "en";
console.log(flagName("JP-13", lang));

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.6.0.