localizedLayout関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The layout with each team's name in the language: what the drawing, the table and the description are written from.
インポート
import { localizedLayout } from "@johnmorrisdotca/taisen-brackets";
定義
function localizedLayout(layout: BracketLayout, v: Voice): BracketLayout
引数
| 名前 | 型 | 説明 |
|---|---|---|
layout | BracketLayout | The layout from |
v | Voice | The voice of a language, from |
戻り値
BracketLayout
A new layout; the one passed in is not changed.
例
import { layoutBracket, localizedLayout, voiceOf } from "@johnmorrisdotca/taisen-brackets";
const layout = localizedLayout(layoutBracket([{ sides: ["Aurora", "Harbour"], score: [2, 1] }, { sides: ["Cascade", "Delta"], score: [0, 1] }, { sides: ["Aurora", "Delta"], score: [3, 1] }]), voiceOf({ locale: "ja" }));
console.log(layout.rounds);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。