flagNamefunction
The name of a country in Spanish, as Kuni gives it from Unicode CLDR. A prefecture, a former country, and any place Kuni does not name in Spanish is null.
Import it
import { flagName } from "@johnmorrisdotca/hata/names/es";
Definition
function flagName(code: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | A flag's code, in any case: "JP", "jp", "DE". A former country's alias is read when that place has a name here. |
Returns
string | null
The Spanish name, or null when this language has no name for that flag.
Examples
import { flagName } from "@johnmorrisdotca/hata/names/es";
console.log(flagName("JP"));
console.log(flagName("JP-13"));Japón
nullWhat it prints (run when this page was built)