Internationalization of UI

I’m using InstantSearch.js with vanilla js. When using refinementList widget, with options:

  • Limit: X
  • ShowMore: true

What would be the smartest way to translate button’s label in another language?

Same question with poweredBy widget. Is there an option to translate “Search by”?

I know React InstantSearch supports a translation attribute for most widgets. I’m trying to find out if there’s an equivalent for vanilla JS.

1 Like

Ok, I’ve got it. In vanillas JS, you can override these translations via the templates. For instance here is the translation for the “Show more” text:

The PoweredBy widget doesn’t have a translation capability, so you’ll either need to leave it as is, or override it completely using a connector:

1 Like