I have a function which redirects user to certain 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?


  • What's the previous decision that has to be taken before redirecting? – brasofilo Apr 22 '13 at 20:03
  • Whole function:pastebin.com/b4LsXRpg – HunterListInsight 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

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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