Title: Translate with &quot;get_permalink&quot;
Last modified: August 21, 2016

---

# Translate with "get_permalink"

 *  Resolved [FireGhost0610](https://wordpress.org/support/users/fireghost0610/)
 * (@fireghost0610)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/)
 * Hello,
 * Nice plugin here ! You have done a really good work !
 * But, I have a problem with the “eShop” plugin who use the function “get_permalink”
   to get some url. This function return automaticaly the default language of an
   page’s ID … ([more here](http://codex.wordpress.org/Function_Reference/get_permalink))
   
   So if I’m on a french page and I clic on a url created with “get_permalink”, 
   I’ll go on an english page, not a french one .. That’s a problem.
 * How could I fix this ? Do you have a hack of the “get_permalink” function ?
 * Thanks
    (Sorry if my english is bad .. 🙂 )
 * [http://wordpress.org/plugins/ceceppa-multilingua/](http://wordpress.org/plugins/ceceppa-multilingua/)

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

 *  Plugin Author [Alessandro Senese aka Ceceppa](https://wordpress.org/support/users/ceceppa/)
 * (@ceceppa)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/#post-4353972)
 * Hi,
    sorry for delay… I can do same tests… Can you can contact me here: [http://www.alessandrosenese.eu/contatti](http://www.alessandrosenese.eu/contatti)?
 * Regards
 *  Thread Starter [FireGhost0610](https://wordpress.org/support/users/fireghost0610/)
 * (@fireghost0610)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/#post-4354025)
 * Hello,
 * I got a bit deeper. Now, I just need a function to get the translated page by
   his default ID.
    For example, if “get_permalink” call an english page ID while
   the user is on a french page, the function that I need will convert the link 
   to the french ID page (using the WP filter “page_link”). Do you already have 
   a function like this or should I code this one ? 🙂 (I can use the “wp_ceceppa_ml_posts”
   table for the translations)
 * Thanks
 * PS: I contacted you with the link that you gave to me.. Did you recive the mail?
 *  Plugin Author [Alessandro Senese aka Ceceppa](https://wordpress.org/support/users/ceceppa/)
 * (@ceceppa)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/#post-4354026)
 * Hi,
    Sorry, I received the mail, but I forgot to answer :(… However try the function:
 * cml_get_linked_posts( $post_id );
 * It will return an array like:
 * Array
    ( [de] => 153 [es] => 151 [it] => 145 [posts] => 153,151,145 )
 * The argoument of the function is optional, if you pass “null” its value will 
   be the current id of post/page…
 * Regads
 * PS: Sorry again 🙁
 *  Thread Starter [FireGhost0610](https://wordpress.org/support/users/fireghost0610/)
 * (@fireghost0610)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/#post-4354039)
 * Hi,
 * Thank you for your answers. It helps me a lot and I found a solution to my problem.
   I used cml_get_linked_post for translating the link I wanted.
 * So, thank you !
    Regards

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

The topic ‘Translate with "get_permalink"’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ceceppa-multilingua_4faedb.svg)
 * [Ceceppa Multilingua](https://wordpress.org/plugins/ceceppa-multilingua/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ceceppa-multilingua/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ceceppa-multilingua/)
 * [Active Topics](https://wordpress.org/support/plugin/ceceppa-multilingua/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ceceppa-multilingua/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ceceppa-multilingua/reviews/)

## Tags

 * [get_permalink](https://wordpress.org/support/topic-tag/get_permalink/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 4 replies
 * 2 participants
 * Last reply from: [FireGhost0610](https://wordpress.org/support/users/fireghost0610/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/translate-with-get_permalink/#post-4354039)
 * Status: resolved