Language

Language

The language can be chosen in the config.yml (see above) and loaded at run-time via /auc reload. Creating your custom language files requires the following steps.

  • Have Bukkit started at least once with CraftBay activated. The default language files will have been copied to plugins/CraftBay/lang.
  • Locate the language files you want to work off of, propably en_US.yml.
  • Create a copy with the .yml suffix. Do not name it like any of the existing ones; your changes would not persist a restart.
  • Edit your copy. I attempt to comment the default files well, but some details are propably best learned from the given examples.
  • Put the name of your file in the lang option in the config.yml. If your file is called test.yml, you have to set set lang: test.
  • Either (re)start the server or type /auc reload.

If your language file is faulty, an elaborate error message will appear on the console output. Make sure to read the yaml documentation carefully, should you run into problems.

To give you an impression, here is a small cutout of the en_US.yml:

auction:
  create:
    QueueFull: '<warn>Wait until other auctions have ended!'
    NotEnoughItems: '<warn>You do not have enough <warnhi>{itemdesc}<warn>!'
    FeeTooHigh: '<warn>You cannot afford the fee of <warnhi>{fee}<warnhi>!'
    FeeDebited: '<dfl>Your account has been debited <hl>{fee}<dfl>.'
    OwnerCooldown: '<warn>You have to wait <warnhi>{cooldown}<warn>!'

As you can see, there are formatting directives and variables. They are documented in the file.


Comments

Posts Quoted:
Reply
Clear All Quotes