Product API for Multilingual

When I use Wix Velo for the products, I need to show the contents of the fields like (product) Name and Description on the language that the site visitor selected. Even though I have one additional language on the site, contents of the fields are shown only on the default language.

Is there any way how to show the Name and Description on other language by using Product API in Wix Velo?

Thanks.

Great question Venko. @wingcc , do you know if this is possible?

I am here :slight_smile:

Woohoo! Rockstar.

You can create a database that saves all the extra info (like translated things) and have a field that references the product.

Then, on the website, use the dataset that connected to the extra info database, then links it to the repeater, then connects the fields (if you have more visitor in English, link English).

Then use the Wix Velo API’s to get the user language. If is Chinese, then set the fields to Chinese field:

Use repeater onItemReady, then you can have the whole item data for each item, then set the text element to another language

Use the extra info database because when you link it to dataset element, you can select your extra info + original wix store info as well - so you dont need to query 2 times

Thanks for the reply @wingcc . Appreciate the efforts. Your approach is proving me that I am in the right direction. I am using this approach in the Wix Blog app to grab the information from the author collection and excerpts, title and so on. But in Wix Store this approach is lengthy to make it and is complex for maintenance. Here is why …

With your explanation, in essence I need to create fields in the Database Collection that are not extras for the Wix Store Product but rather essential fields of Wix Store entity like Name, Description and Additional Info Sections. Then, I need to translate the product itself in Wix Store and create a record with translation in the database too. In Wix Store dashboard I have nice editor with sections, and in database there is not. If I change the translation in Wix Store, I need to change it in the database too. So two language versions will go out of sync pretty soon. Finally, instead of using the nice features in displaying the Wix Store components, I need to rely only on dataset and repeaters.

Wouldn’t be easier if Wix Velo team or Wix Store team (1) expose the translations in the built-in Collections (as separate records) and/or (2) to display the results from the API calls on the web site based on the language that the user has selected?

Thanks for the answer.