Reference · Draw a bracket, a table or a road to the final
localizedLayoutfunction
The layout with each team's name in the language: what the drawing, the table and the description are written from.
Import it
import { localizedLayout } from "@johnmorrisdotca/taisen-brackets";
Definition
function localizedLayout(layout: BracketLayout, v: Voice): BracketLayout
Parameters
| Name | Type | Description |
|---|---|---|
layout | BracketLayout | The layout from |
v | Voice | The voice of a language, from |
Returns
BracketLayout
A new layout; the one passed in is not changed.
Examples
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);2What it prints (run when this page was built)