organisationName関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
An organisation's name, in English or Japanese: what a screen reader should say for the flag, or a caption. Any
language tag that starts with ja is Japanese; anything else is English.
インポート
import { organisationName } from "@johnmorrisdotca/hata/organisations";
定義
function organisationName(id: string, lang?: string): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | string | An organisation's id, in any case, with or without |
lang (省略可) | string |
|
戻り値
string | null
The name, or null when the id has no flag here.
例
import { organisationName } from "@johnmorrisdotca/hata/organisations";
console.log(organisationName("org:eu")); // "European Union"
console.log(organisationName("org:eu", "ja")); // "欧州連合"
console.log(organisationName("org:xx")); // nullEuropean Union
欧州連合
null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。