Reputation: 7955
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.
Upvotes: 1
Views: 2814
Reputation: 529
Came across this problem too. Adding /
didn't make any difference.
Using ?setlang=no
instead solved my problem.
Source: qTranslate-X FAQ
Upvotes: 0
Reputation: 7955
I solved the issue. Adding /
at the end of the link helped.
Upvotes: 1