Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement translations for item name and lore #3763

Merged
merged 2 commits into from Oct 12, 2022

Conversation

Yeregorix
Copy link
Member

Translate the components directly on item nbt tag right before sending to the client.
Undo the modifications when receiving an item from the client.
The nbt tag is not modified if there is nothing to translate.

@SawFowl
Copy link
Contributor

SawFowl commented Sep 29, 2022

I would like to see similar functionality for entities.

@zml2008
Copy link
Member

zml2008 commented Sep 29, 2022

@SawFowl what functionality doesn't work on entities? most areas of the server support custom translations already, inventory stuff was just an exception

@SawFowl
Copy link
Contributor

SawFowl commented Sep 29, 2022

@SawFowl what functionality doesn't work on entities? most areas of the server support custom translations already, inventory stuff was just an exception

Can I have an example of a translated entity name? I tried to create a villager with a translatable name. I couldn't do it.

@Yeregorix
Copy link
Member Author

I just tried setting a translation as an entity name and it works fine. The only problem is that entity names are not updated when the player change his language. If you need an example to setup server-side translations, look at the ChatTest plugin.

@Zidane Zidane merged commit 6ed72d7 into SpongePowered:api-8 Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants