Language Files
Language files are a way to translate Honeypot's chat output to your native language. They also allow for custom formatting of messages, and even changing the prefix of Honeypot to remove its branding if you so chose!
Rather than list out every single individual translation, you can download a sample translation in the en_US language here
Translating Honeypot
If you're here to learn how to translate Honeypot, thank you! There are two ways you can do this, one is easier than the other but the other makes it easier on me lol
Contribute via Pull Request
The quickest way to provide translation is via a pull request.
Create a fork of the repository.
Locate the
lang
folder withinsrc/main/resources/lang
Create a new file with the language code. For example, if you were creating one for Chinese (PRC), it would be
zh_CN.yml
. For Chinese (Hong Kong) it would bezh_HK.yml
. Microsoft keeps a list of these language codes as a good reference as part of their Open Specifications. Copy and paste one of the existing language files, then translate everything past the 2nd line (Don't touch the language-version line 😁).Commit your changes to your fork
Create a pull request with the new language file. Once I review the changes, I will merge them into the project :)
Contribute via providing me a language file
This is easier, but definitely slower.
Locate the
lang
folder withinsrc/main/resources/lang
Create a new file with the language code. For example, if you were creating one for Chinese (PRC), it would be
zh_CN.yml
. For Chinese (Hong Kong) it would bezh_HK.yml
. Microsoft keeps a list of these language codes as a good reference as part of their Open Specifications. Copy and paste one of the existing language files, then translate everything past the 2nd line (Don't touch the language-version line 😁).Send the file to me my Discord in either a ticket or the #honeypot channel. Once received I will review the file, add it to the repo, and create a new commit.
Creating personal translations
If you'd like to create your own translations locally without waiting for my plugin to support them, you can do that too! (Please share them though 🥺)
Load the plugin for the first time, just to generate the default
en_US.yml
language file. You can edit that file if you want, or you can create a new one. If you chose to just edit that file, edit it, restart the server, and enjoy your translations. If you want to create a new one, keep readingCopy the
en_US.yml
file and rename it whatever you want. The name doesn't matter, I just use thexx_YY
format for consistency.Copy the
en_US.yml
file and rename it whatever you want. The name doesn't matter, I just use thexx_YY
format for consistency.Translate everything past line 2 and save it.
Open the Honeypot
config.yml
file in the Honeypot folder. You will see a section calledCHAT SETTINGS
. It looks like this:###################################################################### # C H A T S E T T I N G S # ###################################################################### # Select your language. Current supported languages are: [en_US, es_MX, fr_FR, ja_JP, zh_CN] # Want to create your own translation? Visit here: https://github.com/TerrorByteTW/Honeypot/wiki/Translating-Honeypot language: en_US # If you're providing your own language file, set this to true. If you've incorrectly translated it, though, expect errors in console! # If you don't know what this is, leave it set to false bypass-language-check: falseChange
language
to whatever you named your file (MINUS the .yml part) and changebypass-language-check
totrue
. If you leave it false, the plugin will, by default, load en_US if your language isn't already supported by the plugin (Likely not)Voilà! You've successfully created your own language. Beware though, if you fail to translate it correctly or miss something (Or if the plugin updates later down the line and adds new translations) then expect errors in the console 😉