Reference · Views, replay and player
playerNamefunction
Returns the localized name for one side.
Import it
import { playerName } from "@johnmorrisdotca/gunjin";
Definition
function playerName(language: Language, player: Player): string
Parameters
| Name | Type | Description |
|---|---|---|
language | Language | The native English or Japanese display language. |
player | Player | The acting player, 0 or 1; the lifecycle checks that this is the expected player. |
Returns
string
Returns the localized name for one side.
Examples
import { playerName } from "@johnmorrisdotca/gunjin";
console.log(playerName("en",0));RedWhat it prints (run when this page was built)