#(Arkyoh) <materialTag.translated_name.text_width> returning 0
31 messages · Page 1 of 1 (latest)
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
translated_name is a translatable, e.g. it's just a translation key that gets translated by the client (which has cool benefits like the client displaying it in any language)
Which is why it's width isn't actually anything, but you can get it's English name using
!t strip_color
Returns the element with all color encoding stripped.
This will remove any/all colors, formats (bold/italic/etc), advanced formats (fonts/clickables/etc), and translate any translatables (&translate, &score, etc).
This will automatically translate translatable sections
text manipulation
ElementTag
Mmmmh... I see, yes
So the text is never translated server-side? There is no way to get the clients language?
!tag playertag.locale
you can use this, and use a choose/case matching to determine a length of text pre-defined by you, but otherwise no - this isn't something that a tag can automagically resolve your initial request
oh! seems interesting!
can I also access the translatable ? I don't really understand how the <&translate[]> tag works but it would be very useful to be allowed to translate a material/entity name with a given language (as <player.locale>)
!t translate
!t <&translate[<key>]>
Returns a special chat code that displays an autotranslated message.
For example: - narrate "Reward: <&translate[item.minecraft.diamond_sword]>"
Be warned that language keys change between Minecraft versions.
Note that this is a magic Denizen tool - refer to !language Denizen Text Formatting.
You can use !tag ElementTag.strip_color to convert the translated output to plain text (pre-translated).
ElementTag
The translate tag does what Material.translated_name does automatically for you for materials
It uses the client locale to return the proper translation
If you add strip_color again, it will output the english translation.
But I can't get the translation server-side? So I can use the translated plain text in my scripts
no you cant get translations server side, the server doesnt have it
The server only has English translations, as mentioned above ^ - if you really want to you can download and load other translation files yourself, but that's usually overcomplicating
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@celest crown