Getting localized application command option
I can't really find how to parse options using their name when I used i18n to localize them.
Thanks in advance!
Solution:Jump to solution
Sapphire Framework
Getting Started | Sapphire
This plugin implements [i18next], a powerful internationalization library. It provides a simple way to internationalize
12 Replies
Solution
Sapphire Framework
Getting Started | Sapphire
This plugin implements [i18next], a powerful internationalization library. It provides a simple way to internationalize
is this for things like
addStringOption
@Nullified ?because then you want to use
applyLocalizedBuilder
(https://www.sapphirejs.dev/docs/Documentation/api-plugins/modules/sapphire_plugin_i18next#applylocalizedbuilder) to add localized names and descriptionsIt was actually for getting the option in the
chatInputRun
function to retrieve the value, I used this:However since I swapped to TSC I'm having a problem, my commands stopped working but everything else seems to work 😂
First I thought the translations might need a copy to /dist/, this didn't help yet
This log is not called, for example
OOOH right...
Makes sense 😄
There we go
The trial/error has been real today, phew
glad you got this, many people would have similar issues and give up before figuring it out. FWIW something like this is mentioned on the guide too.
Yeah it always goes like this, I get an issue that generates 5 other issues and before I know it it's 5am in the morning haha