Switching languages directly in the Template (1 post)

  1. bluedrag
    Posted 3 years ago #

    I have a really weird problem that's really stumping me. I have an almost exact replica of this code working on a different site, so I know the logic behind just something isn't right, it has to be some kind of syntax error. Basically I just want to have some text change between english and french on my category page. Because of this it has to be done within category.php (im using qtranslate)

    Here is my code:

    if(in_category('Banjos')) {
    		_e("<!--:en-->ENGLISH SIDE<!--:--> <!--:fr-->FRENCH SIDE<!--:-->");
    	if(in_category('Autoharps')) {
    		_e("<!--:en-->ENGLISH SIDE<!--:--> <!--:fr-->FRENCH SIDE<!--:-->");

    the first if statement (banjos) works perfectly but the second (autoharps) only shows the english side, nothing for the french side. This happens with all other categorys EXCEPT banjos.

    Like I said before I have a replica of this, with different category names working perfectly on a different site, so I'm completely stumped.

    Ideas anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic