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
| Name | Type | Description |
|---|---|---|
id | string | An organisation's id, in any case, with or without |
lang (optional) | string |
|
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")); // nullEuropean Union
欧州連合
nullWhat it prints (run when this page was built)