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 · Flags of international organisations

organisationNamefunction

An organisation's name, in English or Japanese: what a screen reader should say for the flag, or a caption. Any language tag that starts with ja is Japanese; anything else is English.

Import it

import { organisationName } from "@johnmorrisdotca/hata/organisations";

Definition

function organisationName(id: string, lang?: string): string | null

Parameters

NameTypeDescription
idstring

An organisation's id, in any case, with or without org:.

lang (optional)string

"en" (the default), "ja", or a language tag such as "ja-JP".

Returns

string | null

The name, or null when the id has no flag here.

Examples

import { organisationName } from "@johnmorrisdotca/hata/organisations";

console.log(organisationName("org:eu"));       // "European Union"
console.log(organisationName("org:eu", "ja")); // "欧州連合"
console.log(organisationName("org:xx"));       // null
European Union
欧州連合
null

What it prints (run when this page was built)

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