Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a function which redirects user to certain page:

wp_redirect('http://address/page');

Usually I would just use:

<?php _e("<!--:en-->english permalink<!--:--><!--:de-->german permalink<!--:-->"); ?>

But this is specific situation and I can't use it this way...

Any idea how to do this?

Thanks!

share|improve this question
    
What's the previous decision that has to be taken before redirecting? –  brasofilo Apr 22 '13 at 20:03
    
Whole function:pastebin.com/b4LsXRpg –  Mrozh Apr 22 '13 at 20:08
    
You can edit your Q and add the code to it. But I don't see how the "language logic" applies in that function. –  brasofilo Apr 22 '13 at 20:11
add comment

1 Answer

up vote 1 down vote accepted

Are we talking permalinks here or any URL? If any, create an array( 'en' => 'en_url', 'de' => 'de_url' ); and get the URL by accessing the array using qtrans_getLanguage() index.

If you're translating internal permalink use the qtrans_convertURL() function.

share|improve this answer
    
Awesome, this works! Whole code: pastebin.com/fDLbjtrB –  Mrozh Apr 22 '13 at 20:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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