flagNamefunction
The name of a country in Simplified Chinese, as Kuni gives it from Unicode CLDR. A prefecture, a former country, and any place Kuni does not name in Simplified Chinese is null.
Import it
import { flagName } from "@johnmorrisdotca/hata/names/zh-Hans";
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 Simplified Chinese name, or null when this language has no name for that flag.
Examples
import { flagName } from "@johnmorrisdotca/hata/names/zh-Hans";
console.log(flagName("JP"));
console.log(flagName("JP-13"));日本
nullWhat it prints (run when this page was built)