Is there a way to get Component through the player? #922
Closed
xLikeWATCHDOG
started this conversation in
General
Replies: 3 comments 6 replies
-
Legacy strings do not support translations. You can run the components through the GlobalTranslator yourself if the components are server-side, otherwise you're SOL. |
Beta Was this translation helpful? Give feedback.
6 replies
-
This is also a duplicate of the issue you opened two weeks ago (#908), please do not open duplicate issues asking the same thing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In order to popularize translation in my plugin, I used the Gui library (Triumph GUI) that uses the Adventure library when designing the Gui interface. One of the reasons is that I'm going to support the 1.8.8 server, and another reason is that I need to go to Compent for the translation operation.
For example
Then, I found that when I built it directly to Compent and then set it to title.
![image](https://private-user-images.githubusercontent.com/73741466/237410401-6774d717-c39a-4fb4-8339-7e6f6560d157.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDU0ODcsIm5iZiI6MTcyNjE0NTE4NywicGF0aCI6Ii83Mzc0MTQ2Ni8yMzc0MTA0MDEtNjc3NGQ3MTctYzM5YS00ZmI0LTgzMzktN2U2ZjY1NjBkMTU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDEyNDYyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTllMGYwN2Q0NDI2NDMxNDI1YjFjMzI0ODJhZGFiYjkwOWFmYzAxNDQ5NWZjMWZkYWZmOTkyZDcyNTY3MTBmMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GN7S7jmaThh0DTP1EOCaTyOmQ3eyPdtFzciCptAmgw0)
I found that it sets the title directly like this.
Legacy.SERIALIZER.serialize(title)
Then it returns
floracore.command.report.abnormal
directly in the menuSo, what I'm trying to say is that I want to get the processed Compent directly through the player (Sender).
How should I do that?
Also, I would like to know how I can get Compent to get the processed String through the player (Sender).
If this is not possible, it also means that my Gui must use the source language and cannot be multilingual.
So that's really important to me.
Because I don't seem to see a similar operation in the documentation.
Please help me! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions