本文へ移動

Taisen Brackets対戦

対戦の一覧から、トーナメント表をSVGで描きます。

対戦(たいせん)は、二者が向かい合って勝負することです。 名前について(英語)

目次

リファレンス · 各対戦の位置を計算

countryName関数

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

The name of a country in a language, from its ISO 3166 code, through Intl.DisplayNames: no list to write ("DE" is Germany, Allemagne, ドイツ, Alemania, Deutschland). The home nations (GB-ENG, GB-SCT, GB-WLS, GB-NIR) are not regions to Intl, so they have names here. A code Intl does not know gives undefined.

インポート

import { countryName } from "@johnmorrisdotca/taisen-brackets/layout";

ほかのエクスポート元: @johnmorrisdotca/taisen-brackets

定義

function countryName(code: string, locale?: string | Locale): string | undefined

引数

名前型説明
codestring

The country's ISO 3166 code: CA, JP.

locale (省略可)string | Locale

The language, as for locale. Default English.

戻り値

string | undefined

The name, or undefined when the code is not a country the runtime knows.

例

import { countryName } from "@johnmorrisdotca/taisen-brackets";

console.log(countryName("JP", "en"), countryName("JP", "ja"));
Japan 日本

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

ソースを見るGitHub で編集@johnmorrisdotca/taisen-brackets 0.20.0 のソースから作成しました。

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