say関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The words for key in lang, with each {name} filled from values; English when the language has none; the key itself when nobody has.
インポート
import { say } from "@johnmorrisdotca/karakuri";
定義
function say(lang: KarakuriLanguage, key: string, values?: Record<string, string | number>): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
lang | KarakuriLanguage | The native English or Japanese language. |
key | string | The native localized-message key. |
values (省略可) | Record<string, string | number> | Numbers to hash, or localized-message placeholders specified by the signature. |
戻り値
string
The words for key in lang, with each {name} filled from values; English when the language has none; the key itself when nobody has.
例
import { say } from "@johnmorrisdotca/karakuri";
console.log(say("en","game_tube_sort"));Tube Sort出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。