本文へ移動

Kuni国

国、コード、名前、行政区画を調べ、必要なときに国のデータを読み込み、標準の国のカードを表示できます。

「国(くに)」は、国を表す日本語です。 名前について(英語)

目次

リファレンス · /subdivision-names/es

NamedSubdivision型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

One subdivision's name in one language, with where it came from.

インポート

import type { NamedSubdivision } from "@johnmorrisdotca/kuni/subdivision-names/es";

ほかのエクスポート元: @johnmorrisdotca/kuni/subdivision-names/de, @johnmorrisdotca/kuni/subdivision-names/zh-Hans, @johnmorrisdotca/kuni/subdivision-names/zh-Hant

定義

interface NamedSubdivision {
    code: string;
    country: string;
    shortCode: string;
    name: string;
    source: NameSource;
}

メンバー

名前型説明
codestring

The ISO 3166-2 code, as in the main entry: "JP-13".

countrystring

The alpha-2 code of the country.

shortCodestring

The part of the code after the hyphen.

namestring

The name in this language. Never empty; a subdivision with no name is not listed.

sourceNameSource

Where the name came from.

例

import type { NamedSubdivision } from "@johnmorrisdotca/kuni/subdivision-names/es";

const one: NamedSubdivision = { code: "JP-13", country: "JP", shortCode: "13", name: "Tokio", source: { source: "cldr", tag: "es", draft: "provisional" } };
console.log(one.name);   // "Tokio"
Tokio

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kuni 1.19.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。