I have a project where players can choose their language, and then only messages in their language would be sent to their chat.
This is impossible(or unreliable) to implement because this code is illegal:
String message = ...;
Language playerLanguage = ...;
//don't send the message if it's not in the player's language
if(!LanguageDetectorBuilder.fromLanguages(playerLanguage).build().detectLanguageOf(message) != playerLanguage)
return;
I have a project where players can choose their language, and then only messages in their language would be sent to their chat. This is impossible(or unreliable) to implement because this code is illegal: