medievalNamefunction
A banner's name, in English or Japanese: whose it was and what it is. Any language tag that starts with ja is Japanese.
Import it
import { medievalName } from "@johnmorrisdotca/hata/medieval";
Definition
function medievalName(id: string, lang?: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A banner's id, in any case, with or without |
lang (optional) | string |
|
Returns
string | null
The name, or null when the set has no such banner.
Examples
import { medievalName } from "@johnmorrisdotca/hata/medieval";
console.log(medievalName("med:red-cross")); // "The red cross on white (St George's Cross)"
console.log(medievalName("med:red-cross", "ja")); // "白地に赤い十字(聖ジョージ十字)"The red cross on white (St George's Cross)
白地に赤い十字(聖ジョージ十字)What it prints (run when this page was built)