Languages
Picking a language, editing the messages and adding a translation of your own.
AT-AuctionHouse ships in English, Spanish, French and Japanese. All four files are extracted on the first run, so you can read them before deciding which to use.
GENERAL:
LANGUAGE: englishThe value is a filename inside lang/, without the .yml.
| Value | File |
|---|---|
english | lang/english.yml |
spanish | lang/spanish.yml |
french | lang/french.yml |
japanese | lang/japanese.yml |
An unknown name logs a warning and falls back to English rather than failing startup.
These files hold chat text only. Item names and lore inside the menus live in
gui.yml, so that restyling a menu means editing one file rather than
two.
Editing messages
Change any value freely. Keys have to stay exactly as they are.
PREFIX: "&8[f9dffAH&8] &r"
BUY:
SUCCESS: "&aPurchased &b{item} &afor &b{price}&a."PREFIX is prepended to every single-line chat message. It is not prepended to lists such
as the help output or /ah about.
Colours work the same as everywhere else: legacy codes, hex, hex tags, gradients and rainbows. See Configuration.
Silencing a message
Set a value to "" and that message is skipped entirely. This is the supported way to
mute an individual line, for example the high-value broadcast:
SELL:
BROADCAST: ""Placeholders
Placeholders are written as {name}. Each message accepts a specific set, and the shipped
file lists them in a comment above each key.
An unknown placeholder is left in the text rather than blanked, so a typo is visible instead of silently eating part of the sentence.
Time units
The countdown on every listing is built from the TIME block, so {time-left} in
gui.yml follows whatever you put here.
TIME:
DAY: "d"
HOUR: "h"
MINUTE: "m"
SECOND: "s"
ZERO: "0s"| Key | What it is |
|---|---|
DAY | Label for whole days |
HOUR | Label for hours |
MINUTE | Label for minutes |
SECOND | Label for seconds |
ZERO | The whole string shown once a listing has run out |
The four labels are written straight after their number with no space, so 2 plus h
gives 2h. Keep them short. Only whole units are shown, largest first, which is what turns
one duration into 1d 4h 30m 12s and another into 45s.
ZERO is not a label. It replaces the countdown entirely, so a word such as Expired
works there as well as 0s.
The shipped translations differ, because these are display text like any other line in the file:
| File | Day | Hour | Minute | Second | Zero |
|---|---|---|---|---|---|
english.yml | d | h | m | s | 0s |
spanish.yml | d | h | m | s | 0s |
french.yml | j | h | m | s | 0s |
japanese.yml | 日 | 時間 | 分 | 秒 | 0秒 |
Prices are not here. The currency symbol and the K / M / B suffixes live in
config.yml under FORMATTING, because the plugin reads those back when a player types a
price. See Configuration.
The decomposition itself is fixed at days, hours, minutes and seconds. Auction durations are set in hours or days, so a larger unit would only ever show up for a misconfigured listing.
Per-key English fallback
The plugin holds two language files in memory at once: the one you selected, and English.
Every lookup tries your language first. If the key is missing there, or is present but empty in a way that has not been set deliberately, English is used for that one key.
This means a half-finished translation is still safe to use. It degrades one line at a time rather than blanking chat, and a translator can work through the file gradually.
The fallback is per key, not per file. A file containing five keys works fine. It does not need to be complete before you switch to it.
Adding your own language
Copy an existing file
Copy lang/english.yml to lang/<yourname>.yml. Use lower case for the filename.
Translate the values
Leave every key exactly as it is. Only the values on the right change.
Point the config at it
GENERAL:
LANGUAGE: yournameReload
Run /ah reload. The console line printed at enable time also names the language actually
in use, which may differ from the one you asked for if the file could not be found.
A language file you added yourself is loaded as-is and skips versioning entirely, because
there is nothing in the jar to merge it against. The shipped four are kept up to date
automatically through their LANG-VERSION key. Your own file is yours to maintain, and the
English fallback covers any key a future release adds.
What is in the file
Common responses that are not tied to one feature: no permission, players only, reload
succeeded, generic error, plus the words used for on and off states in /ah about.
UNKNOWN-ITEM is the odd one out. It is not a message. It is shown in place of an item's
name when the item cannot be read, so it can appear in a menu lore line or in a chat
message wherever {item} is used. English ships Unknown, Spanish Desconocido, French
Inconnu and Japanese 不明.
/ah and its subcommands. The help output is four separate blocks: a header, the player
commands, the admin commands and a footer. The admin block is only sent to players holding
atauctionhouse.admin.
{label} is the alias the player actually typed, so the help text shows /ah,
/auctionhouse or /atah to match.
ABOUT is the /ah about output and accepts {version}, {platform}, {backend},
{crossserver}, {listings} and {author}.
Creating a listing, on both routes: the price prompt, the insert prompt, cancellation, every validation refusal, the success line and the high-value broadcast.
PRICE-TOO-LOW and PRICE-TOO-HIGH take {min} and {max} from your config, already
formatted. MAX-LISTINGS takes {max}, which is that player's own allowance rather than
the config default.
Purchase success, cannot afford, already sold, cannot buy your own listing, and the notification sent to the seller.
What happens to an existing listing after it was created: cancelled, expired, removed by an admin, and not found.
The collection box. Items received, money received, inventory full, and a single item collected.
One prompt per search method, since the wording has to differ, plus the timeout, cancelled, results, per-player results and cleared messages.
The unit labels for the countdown on every listing, plus the string shown once a listing has run out. Covered in full under Time units.
Applying changes
/ah reloadre-reads the language files along with config.yml and gui.yml. Switching
GENERAL.LANGUAGE takes effect on the same reload.