Support » How-To and Troubleshooting » Switching languages directly in the Template

Switching languages directly in the Template

  • 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?

  • The topic ‘Switching languages directly in the Template’ is closed to new replies.
Skip to toolbar