Any text in a widget that does not come from a remote API call can be defined in a resource bundle so that it can be localized.
Note: You can include localized resources in your widgets/elements by including a /locales
directory. However, this is not necessary. You can just as easily hardcode strings inside the HTML templates or JavaScript source files.