4

I have multi-language store in Magento v 2.2.5

English enter image description here

French enter image description here

Now,I have created multiple REST API's, like

  • Custom Home Page REST API's
  • GET Products, Categories
  • Add to cart
  • Checkout
  • Place an Order (In short whole front-store)

Now I want these API's in multi-language, Any one have achieved the same with Magento 2 or with custom code.

  • Only Guidance will be helpful.
  • 2
    Hi @aditya, you can always put the default store view before "/{store_view_code}/V1/", this will set the store view id and you can manage that – WISAM HAKIM Oct 22 '18 at 15:08
  • multi-language From store_view code ? How ? can you please elaborate ? – Aditya Shah Oct 24 '18 at 13:50
  • 1
    let say you two store views (store_en/store_de), if you call this api /store_en/V1/products, then you will retrive all products for the store_en store view, so you only need to put the store code before the /V1/, – WISAM HAKIM Oct 24 '18 at 18:58
  • ooh okay, please add as answer :) – Aditya Shah Oct 24 '18 at 19:07
  • i just answered this below – WISAM HAKIM Oct 24 '18 at 23:53
3

You have to add the store code before the /V1/

For example, let say you have two store views (store_en/store_de), if you call this api /store_en/V1/products, then you will retrive all products for the store_en store view, so you only need to put the store code before the /V1/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.