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.
asked Oct 16, 2018 at 5:57
5
  • 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 Commented Oct 22, 2018 at 15:08
  • multi-language From store_view code ? How ? can you please elaborate ? Commented Oct 24, 2018 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/, Commented Oct 24, 2018 at 18:58
  • ooh okay, please add as answer :) Commented Oct 24, 2018 at 19:07
  • i just answered this below Commented Oct 24, 2018 at 23:53

1 Answer 1

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/

answered Oct 24, 2018 at 23:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.