0

I'm currently running a shop with WooCommerce and I need my website to use 4 different languages. I used Polylang free plugin to translate my website.

I'm using WooCommerce REST API to send items to the website and it is working just fine via .json files. I can send 100 products at once with name, description, price, sizes, shapes, colors, etc.

My issue here is that I need the NAME and the DESCRIPTION of the product translated. So I need to generate a .json file with let's say: English, Spanish and French, with their NAMES and DESCRIPTION and send the correct file to the correct language. My concern is that I don't know how and if that's possible.

My website's main language is Portuguese and if I send a .json file it creates my product with all its information. The only way I can create a product on other languages is manually, but the goal here is to:

  • send a .json file to the website with 4 different languages;
  • or send 4 different files for each language.

I guess there is Polylang API but I don't really know which part to use or how to use it in this case.

Best regards, Hugo

Jainil
  • 1,488
  • 1
  • 21
  • 26

1 Answers1

0

Polylang (free) does not expose Rest API, it's only available in Polylang Pro version. You might also need Polylang for WooCommerce to piece it all together.

Technically you can use WooCommerce + Hyyan WooCommerce Polylang Integration (does not provide REST API) and implement your own WooCommerce + Polylang REST API "glue" plugin, but it's not an easy task, and I would only recommend this route for very experienced developer.

mindo
  • 472
  • 1
  • 3
  • 10
  • "Technically you can use WooCommerce + Hyyan WooCommerce Polylang Integration (does not provide REST API) and implement your own WooCommerce + Polylang REST API "glue" plugin, but it's not an easy task, and I would only recommend this route for very experienced developer." That is the thing I'm trying to do. Glueing code to implement the translations. I'm already using the plugins you mentioned. – Hugo Caldas Nov 14 '19 at 14:51