1
votes

I want to create a website written in two languages. I used qTranslate and it seems to be working okay. But, I have couple of conditional elements in my theme, like:

<li><a href="/<?php if(qtrans_getLanguage()=='en') { ?>en<?php } else { ?>pl<?php } ?>></li>

Which detects if either language is pl or en and creates the link according to that. But, when I click the link http://localhost/en/something for example, it ommits en and loads http://localhost/something with default language. What can I do to change it?

edit: this happens only on custom post types.

2

2 Answers

1
votes

I solved the issue. Adding / at the end of the link helped.

0
votes

Came across this problem too. Adding / didn't make any difference.

Using ?setlang=no instead solved my problem.

Source: qTranslate-X FAQ