i18n applyLocalizedBuilders Options
I saw in the method parameters one for options. How do I pass them?
The example above does not work. How can I do it?
7 Replies
You're mixing up method parameters and generic type paramaters. The method paramaters dont have options, only. the generic types do and that is only to build the
ParseKeys
type from i18next which is the proper type for the name and description paramaters.
The TSDoc of the function also only mentions the builder and the name and description (params)
The proper usage is in the examples in the TSDoc. Simply hover over the function and it will show you.So there is no option to supply options to the localized builder in any way?
No. What use case would there even be for any options to be configured for a localized builder
Localized builders are for registering commands. It's not like you have any dynamic arguments or anything else dynamic at that point.
it can be added but I really dont see a use case
Hm I use that because I don't wanna hardcore URLs and stuff like that into my .json files. Well then I have to do it, thanks anyways 😄
set them with defaultVariables in the i18next options
you shouldnt pass that stuff every single time...
Can I find how to do that in the docs for i18next or is there a special way for the plugin implementation?
clientOptions.i18n.i18next.defaultVariables
pretty sure. It's part of the i18next config.
also yes it's on the i18next docs.