PDA

View Full Version : Is there a way to do this?



nlpconnections
11-04-10, 18: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?

vBET
11-04-10, 23:30
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, 12:40
Exactly like that or do I need to replace 'language' with a language code?

vBET
12-04-10, 13:44
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>

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vB Enterprise Translator PRODUCER_PRODUCT_VERSION