How to get the string of translation key and declaration


I want to get the string of the translation key of pixelmon mod

`String key = "pixelmon."+ pokemon.getSpecies().name().toLowerCase() + ".name";`
`ITextComponent pokemon_name = new TextComponentTranslation(key);`

The result of the output is
[TranslatableComponent{key='', args=[], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}]


Yes. Where is the issue?


Translations are typically bundled on the client-side. But I guess with universal mods you get them both on the client and server. I don’t know if the server actually loads them (probably not) but the class that holds the raw translation strings is net.minecraft.util.text.translation.LanguageMap


The message I want to achieve is displayed according to the player’s language. If the player uses English is Pikachu, Chinese is 皮卡丘, Japanese is ピカチュウ etc…
So I use a translation key to do it, but the result is not as expected, the output message is not what I want