Title: Localization when using Woocommerce API
Last modified: June 6, 2022

---

# Localization when using Woocommerce API

 *  Resolved [lsondermann](https://wordpress.org/support/users/lsondermann/)
 * (@lsondermann)
 * [4 years ago](https://wordpress.org/support/topic/localization-when-using-woocommerce-api/)
 * Hey guys,
    I’m currently working on the Woocommerce API and especially localization.
   As far as I’ve come, every product and product category contains a field ‘translations’
   which contains IDs with which one can request the translated item, e.g. when ‘/
   products/42’ contains ‘”en”: 1337’ I can request the English version of the same
   item with ‘/products/1337’.
 * This works well for products, but when used for product categories I only get
   redirected to the original item, e.g. for ‘/products/categories/42’ which contains‘”
   en”: 1337’ I request ‘/products/categories/1337’ but it returns me the original,
   not translated item with ID 42.
 * So I’ve got 2 questions for you:
 * Does someone have an idea why it works for products, but currently not for product
   categories? The translations exist and work on the website, but the API seems
   to just redirect to the untranslated version of the item.
 * And secondly, what would be the best way to retrieve all items for a specific
   locale? If I’m requesting ‘/products’ it only returns the items of the original
   locale – so I would have to request every single item with the translated locale
   like ‘/products/13’ and so on to get a list of all of the English items. I would
   love to just be able to do ‘/products’ and retrieve all items regardless of the‘
   lang’ field or to only get items with a specific value set for the ‘lang’ field.
 * If anyone of you knows something helpful, I’d love to hear from you, thanks for
   any help!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [4 years ago](https://wordpress.org/support/topic/localization-when-using-woocommerce-api/#post-15714620)
 * Hi [@lsondermann](https://wordpress.org/support/users/lsondermann/)
 * > This works well for products, but when used for product categories I only get
   > redirected to the original item
 * > I would love to just be able to do ‘/products’ and retrieve all items regardless
   > of the ‘lang’ field or to only get items with a specific value set for the ‘
   > lang’ field
 * I hope you have already taken a look at our localization documentation: [https://woocommerce.com/document/woocommerce-localization/](https://woocommerce.com/document/woocommerce-localization/)
 * Related support documentation for REST API: [https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction](https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction)
 * As this is a development related topic, I’m going to leave it open for a bit 
   to see if anyone is able to chime in to help you out here.
 * We recommend the following places for development-oriented questions:
    - WooCommerce Developer Resources Portal: [https://developer.woocommerce.com/](https://developer.woocommerce.com/)
    - WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
    - WooCommerce Community on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/localization-when-using-woocommerce-api/#post-15734677)
 * Seems we’ve not had additional inputs on this thread. Thus, we encourage you 
   to make use of the above resources.
 * I’ll go ahead and mark the thread as resolved but please feel free to create 
   a new thread if you have further questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Localization when using Woocommerce API’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 2 replies
 * 2 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/localization-when-using-woocommerce-api/#post-15734677)
 * Status: resolved