View Full Version : Is there a way to do this?
nlpconnections
11-04-10, 17:02
I would like to put a notice at the top of all pages that have been auto-translated, to say that the translations were done by Google (and not 100% perfect). Is there something I can add to my header / navbar template?
Basically I want a conditional for - IF the page is translated, show this ... else don't. :)
Is it possible?
Very easy just put if clause with condition checking $_REQUEST['language'] :)
Check this:
<vb:if condition="$_REQUEST['language']">
THIS IS VISIBLE ONLY ON TRANSLATED VIEW
</vb:if>
nlpconnections
12-04-10, 11:40
Exactly like that or do I need to replace 'language' with a language code?
Actual one checks does any language value is set. So it will show additional content on any translated page. If you want do it for specific language then you have to do this:
<vb:if condition="$_REQUEST['language'] == 'LANG_CODE'">
THIS IS VISIBLE ONLY ON TRANSLATED VIEW FOR LANG_CODE
</vb:if>
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.