Title: [Plugin: Polylang] Get_default_category
Last modified: August 20, 2016

---

# [Plugin: Polylang] Get_default_category

 *  Resolved [Compute](https://wordpress.org/support/users/compute/)
 * (@compute)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/)
 * Heya
 * I was wondering if there was a way to get the category of the default language?
 * Lets say I have catA(id=5,default) and catB(id=9). Is there a way to get the 
   id of catA when you have the value of catB?
    It should be possible, as the id
   of catA is stored in catB I just dont know how/where its getting saved 🙁
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/#post-2541002)
 * You can do that with the function pll_get_term.
 *     ```
       $tr_id = pll_get_term($cat_id, 'en');
       ```
   
 * will return the id of the English translation of the category which has $cat_id
   as id. If the category is already in English, the function returns $cat_id.
 *  Thread Starter [Compute](https://wordpress.org/support/users/compute/)
 * (@compute)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/#post-2541005)
 * Wow. That was quick. Worked perfectly.
 * I might be blind but have you written any manual for this plugin?
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/#post-2541007)
 * In polylang/doc/documentation-en.pdf or even [here](http://plugins.svn.wordpress.org/polylang/trunk/doc/documentation-en.pdf).
 *  Thread Starter [Compute](https://wordpress.org/support/users/compute/)
 * (@compute)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/#post-2541008)
 * That is awesome. Thanks alot again 🙂

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

The topic ‘[Plugin: Polylang] Get_default_category’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Compute](https://wordpress.org/support/users/compute/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-get_default_category/#post-2541008)
 * Status: resolved