XLang icon

XLang -----

The Solution to language barriers



[​IMG]
XLang - Translating your chat to allow players to cross language barriers.

XLang uses the DeepL API in order to translate your messages asynchronously in real time as players chat.


Translation Modes:
  • Translate Per Player Locale
  • Server-Wide Translation
Supported Languages:

- Greek: EL - Swedish: SV
- German: DE - Spanish: ES
- Danish: DA - Russian: RU
- Slovak: SK - Italian: IT
- Lithuanian: LT - Hungarian: HU
- Dutch: NL - Finish: FI
- Chinese: ZH - Japanese: JA
- Estonian: ET - Slovene: SL
- English: EN-US - English: EN-GB
- Bulgarian: BG - Portuguese (All Variations Combined): PT-PT
- Polish: PL - Romanian: RO
- French: FR - Czech: CS
- Latvian: LV

Setup:
  1. Download and install the plugin into your 'plugins' folder. You must be running 1.17 or the latest version of 1.16.5. No other versions are supported at the moment.
  2. Run your server and allow it to download the language detection to your 'libraries' folder.
  3. Once the server has started you must go the the 'config.yml' and input your DeepL API Key, replacing the 'XXX'. If you choose to use the DeepL premium you must set this in the config as it uses a different API endpoint.
  4. In-Game, run '/xlang reload' in order to load the API token to start translating.

Commands:
/xlang:
-- reload -> Reloads the config for the plugin.
-- getUsedCharacters -> Returns your current usage for the DeepL api.
-- setTargetLanguage -> Sets the target language for when the translation mode is 'serverWide'
Takes an Argument of:
  1. [DEFAULT] -> EN-GB
  2. [GUI] -> Opens a GUI for you to choose
  3. Any of the provided language codes
-- setTranslationMode -> Sets the translation mode of the server to one of:
  1. serverWide -> All messages will be translated to one language
  2. perPlayerLocale -> Messages will be translated to each player's locale individually or, they can set a custom one with '/setlanguage'.
/setlanguage:
-- reset -> Removes your custom language
-- setLanguage -> Opens the GUI so that you can choose your language


Permissions:
  • XLang.* -> Grants access to all XLang commands
  • XLang.setlanguage -> Grants access to do '/xlang setLanguage'
  • XLang.setmode -> Grants access to do '/xlang setTranslationMode'
  • XLang.getUsedCharacters -> Grants you access to do '/xlang' getUsedCharacters'
  • XLang.reload -> Grants you access to do '/xlang reload'
  • XLang.setPersonalLanguage -> Grants you access to do '/setlanguage' (defaults to everyone)

Features:
EssentialsX Chat integration - Keep your message formatting!

Custom Chat Colours in the config!
[​IMG]
Advanced Chat Hovers for extra information:

[​IMG]
GUI's for picking languages:
[​IMG]

Config:
  • 'deepl.apiKey' -> Your API key for DeepL
  • 'deepl.premiumDeepl' -> Whether you are using Premium
  • 'language.targetLanguageCode' -> The target language code for 'ServerWide' translations
  • 'language.perPlayerLanguage' -> Whether or not it is translating per-player
  • 'colour.ownMessageTranslatedColour' -> The colour of your own messages when they are translated (in hex)
  • 'colour.messageTranslatedColour' -> The colour of a message when they have been translated (in hex)
  • 'chat.addXLangTranslationComment' -> This will add some extra information to the logs when enabled
  • 'chat.enableJoinMessage' -> This will send a message to the player when they join
  • 'chat.joinMessage' -> The string of the join message to send. <lang> is a placeholder for the language code
  • 'chat.translateJoinMessage' -> Whether or not the message should be translated
  • 'chat.joinMessageDelay' -> The delay on the join message. Must be greater than 60 (in ticks).
  • 'chat.hoverMessage' -> Whether to add the hover message on translated messages
  • 'langDetector.enabled' -> Whether to enable the language detector, this will save translations on correct languages, but uses more memory

Support
If you need support or there are bugs head over to the support discord server here or make an issue on the GitHub Repository.

Happy Translating!

Ollie
Resource Information
Author:
----------
Total Downloads: 365
First Release: Jun 19, 2021
Last Update: Nov 3, 2021
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings