I am currently trying to translate my custom UI node and there are some things that I just can't figure out.
- How do I add translation to the nodes defaults in myNode.html? The following does not work:
defaults: {
name: {value: ''},
devices: {value: [RED._("time-scheduler.ui.device")]},
outputs: {value: 2},
"devices " should be an array containing one string.
- I also added translation to myNode.js, using:
RED._("myNode.myText")
This works fine for English but it also displays everything in English (locales/en-US/myNode.json) if the device should receive German (locales/DE/myNode.json) translations. Backend translations to German from the same file are working well though.
- What is the preferred way to add i18n support to a UI nodes scope?