flagName関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { flagName } from "@johnmorrisdotca/hata/names/zh-Hans";
定義
function flagName(code: string): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
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. |
戻り値
string | null
The Simplified Chinese name, or null when this language has no name for that flag.
例
import { flagName } from "@johnmorrisdotca/hata/names/zh-Hans";
console.log(flagName("JP"));
console.log(flagName("JP-13"));日本
null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。