MyLanguageChat v22.1.0.05
This plugin gives your users the capability to write or read in their
own language. Every message will be translated in the user selected
language.
IMPORTANT 1.0:
THIS PLUGIN WILL NO LONGER SUPPORTED!
THE DEFAULT-WEBSERIVE HAS BEEN DISABLED, SO YOU NEED TO USE YOUR OWN!
HOW TO INSTALL A LIBRE-WEBSERVICE CAN BE READ HERE:
https://github.com/LibreTranslate/LibreTranslate
YOU CAN CHECK OUT THE SOURCE-CODE ON GITHUB:
https://github.com/Morgent4u/MyLanguageChat
IMPORTANT 1.1:
It's highly recommended to use the newest MLC-Version (22.1.0.05)!
This version has a fix for the japanse-language!
MyLanguageChat - Settings
First, let's take a look into the settings.yml.
Settings.yml for the version: 22.1.0.04:
Code (YAML):
MyLanguageChat:
Enabled
: true
Settings:
API:
Vault:
Use
: true
SirPlugin:
Use
: false
PlaceholderAPI:
Use
: false
Chat:
Format
: '&8
[&c
%group%&8]&a %p%&7: &f%message%'
CheckForSymbol
:
none
GlobalTranslatedChat:
Use
: false
DefaultLanguage
: EN
Translation:
DetectAutoLanguageOnFirstJoin:
Use
: false
EveryMessageToUserMessage:
Use
: false
DefaultUserLanguage
: EN
Languages
:
- EN - English
- NL - Netherlands
- FI - Finnland
- FR - France
- DE - Germany
- GR - Greece
- HU - Hungary
- IE - Ireland
- IT - Italy
- JP - Japan
- PL - Poland
- PT - Portugal
- RU - Russia
- ES - Spain
- SE - Sweden
- TR - Turkey
- UA - Ukraine
Extern:
MySQL:
Use
: false
Host
: localhost
Database
: database
Username
: user
Password
: pwd
Webservice:
Own:
Use
: false
LibreTranslate:
Use
: false
HTTPDetect
: http://localhost:5000/detect
HTTPRequest
: http://localhost:5000/translate
APIKey
:
none
'Enabled'-Section
Code (YAML):
MyLanguageChat:
Enabled
: true
This section is used to disable/enable the mlc-system by using true/false as a value.
'API'-Section
Code (YAML):
API:
Vault:
Use
: true
SirPlugin:
Use
: false
PlaceholderAPI:
Use
: false
You can choose other plugins which will be supported by the mlc-system.
- The Vault-pluginis used to handle group-names from any permissions-system.
- The PlaceholderAPI supports many placeholders from any plugins.
- The S.I.R-Plugin support has been implemented by a request. When you want to use the S.I.R-plugin you are not able to have different languages in chat. This means you will be able to have one chat which will be automatically translated in a defined language.
I recommend to use the S.I.R-plugin with a Translation-Symbole like '@' or '#'.
If this description is hard to understand, let me know!
'Chat'-Section
Code (YAML):
Chat:
Format
: '&8
[&c
%group%&8]&a %p%&7: &f%message%'
CheckForSymbol
:
none
GlobalTranslatedChat:
Use
: false
DefaultLanguage
: EN
In this section you can define a chat-format or the global-chat behavior.
It also allows you to define a symbol which needs to be set at the begin of a message to get translated.
This section allows you also to set a global-language which every message will be translated in. So in this case if it's enabled it would translate every message to english.
MyLanguageChat - Translation
The 'Translation'-Section:
Code (YAML):
Translation:
DetectAutoLanguageOnFirstJoin:
Use
: false
EveryMessageToUserMessage:
Use
: false
DefaultUserLanguage
: EN
Languages
:
- EN - English
- NL - Netherlands
- FI - Finnland
- FR - France
- DE - Germany
- GR - Greece
- HU - Hungary
- IE - Ireland
- IT - Italy
- JP - Japan
- PL - Poland
- PT - Portugal
- RU - Russia
- ES - Spain
- SE - Sweden
- TR - Turkey
- UA - Ukraine
In this section the magic-happens. 
The 'Detect-Auto-Language-On-First-Join'-entry is used to check the players minecraft-settings language. If a player is from germany and uses the minecraft-settings language 'english' the system will set 'EN' (english) as default-language for the german-player.
The 'EveryMessageToUserMessage'-entry should be enabled if you want that your players should get there own messages in there own language.
For example if a player writes in english and has choosen germany as language, this option will translate the english-written message to germany only for the player.
The 'UserDefaultLanguage' sets a default-language for the user. If your players mostly from germany you should use 'DE' for example. This option should be also set in case that the 'Detect-Auto-Language-On-First-Join' fails it will use the language which has been set to this field.
The 'Languages' is a list of all supported languages from the mlc-system. You can remove entries or names if you don't like to support 'Spain' or 'Russia' for example. You can only rename the country-names not the country-code!
For example these are the languages which I support on my server:
Code (YAML):
Languages
:
- EN - English
- NL - Netherlands
- FR - France
- DE - Germany
The 'Extern'-Section:
Code (YAML):
Extern:
MySQL:
Use
: false
Host
: localhost
Database
: database
Username
: user
Password
: pwd
Webservice:
Own:
Use
: false
LibreTranslate:
Use
: false
HTTPDetect
: http://localhost:5000/detect
HTTPRequest
: http://localhost:5000/translate
APIKey
:
none
Last but not least the 'extern'-section. In this section you can define a database to store user-data in a central place. The plugin will create all necessary tables for the database by itself.
The 'Webservice'-entry is used to use an own webserivce if you have one by your own. It gives you also the capability to not use my default translation-webservice if my server is not reachable.
How to install and use a libretranslate-webservice can be read here:
https://github.com/LibreTranslate/LibreTranslate
On the link above there is also a list further down the webpage with available libre-translate webservices which are able to acces. Use them if you don't have your own webservice or my server is not reachable.
MyLanguageChat - Messages
You should change the "messagesSounds.yml" in the folder "others" to your preferences, after you have edited the settings.yml.
In the "messagesSounds.yml" you can change the messages which will be displayed to the default user. You can also add a sound
which will be played if a user gets a defined message.
In the folder "texts" you can edit more text-messages which will be displayed to the default user.
You should be carefull by editing following line in the file "txt_supported_languages.yml". The correct way to edit this line is to change it from this:
Code (YAML):
- FORMAT=&f
%countrycode% &7- &a%language%
To this (for example), check if the " ' " and " ' " is set at the beginning and at the end:
Code (YAML):
- 'FORMAT=&f
%countrycode% &7Languages: &a%language%'
You can also define in a text-block message a sound which will be played if the user gets the message block.
Commands:
In the file 'txt_cmdhelper4user' in the folder 'texts' you have a list of the commands which can be used.
/Language - Shows this help
/Language list - Shows all listed languages which you have choosen in the 'settings.yml'
/Language select <country-code/country-name> - Changes the default-language for a user.
For
example use the following command if you want read/write in french:
/Language select FR
You can also use the country-code/country-name or country-displayname for the commands. Here is an example:
/Language select Germany
/Language select DE
These commands changes the language to germany.
Permissions:
Setup/admin-group:
- mylanguagechat.setup
Chat-color:
- mylanguagechat.chatcolor
Default-group:
- mylanguagechat.default
Thank you for using my plugin.
If you got any problems or questions, feel free to ask!