#(Arkyoh) <materialTag.translated_name.text_width> returning 0

31 messages · Page 1 of 1 (latest)

celest crown
#

Is there a way to get the text_width of a translated_name? I would like to center the name in the chat but I need the text_width for this and combining these two tags returns me 0 🤔

clear epochBOT
#

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>

austere cypress
#

Which is why it's width isn't actually anything, but you can get it's English name using

#

!t strip_color

valid sandalBOT
# austere cypress !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

Group

text manipulation

Returns

ElementTag

celest crown
#

Mmmmh... I see, yes

#

So the text is never translated server-side? There is no way to get the clients language?

valid sandalBOT
echo tiger
#

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

celest crown
#

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

valid sandalBOT
# celest crown !t translate
Cannot Specify Searched Tag

Multiple possible tags: <&translate[<key>]>, <EntityTag.translated_name>, <MaterialTag.translated_name>, <&translate[<key>].with[<text>|...]>.

celest crown
#

!t <&translate[<key>]>

valid sandalBOT
# celest crown !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).

Returns

ElementTag

deft karma
#

It uses the client locale to return the proper translation

#

If you add strip_color again, it will output the english translation.

celest crown
#

But I can't get the translation server-side? So I can use the translated plain text in my scripts

dense swan
#

no you cant get translations server side, the server doesnt have it

austere cypress
#

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

vivid jacinthBOT
#
Thread Closing Reminder

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