Gacha Records: Support multiple languages

This commit is contained in:
Tesutarin
2022-06-15 10:22:55 +08:00
committed by Melledy
parent 779e0f738d
commit cc4094549e
7 changed files with 31 additions and 3 deletions

View File

@@ -70,6 +70,9 @@ public final class GachaHandler implements Router {
String template = new String(FileUtils.read(recordsTemplate), StandardCharsets.UTF_8)
.replace("{{REPLACE_RECORDS}}", records)
.replace("{{REPLACE_MAXPAGE}}", String.valueOf(maxPage))
.replace("{{TITLE}}", translate(player, "gacha.records.title"))
.replace("{{DATE}}", translate(player, "gacha.records.date"))
.replace("{{ITEM}}", translate(player, "gacha.records.item"))
.replace("{{LANGUAGE}}", Utils.getLanguageCode(account.getLocale()));
response.send(template);
}