Forum Archive - What is the variable of language translation to change pictu

What is the variable of language translation to change pictu
Dec 6, 2013 6:54 pm by yule
Hello, Sorry for my english ... I use the pro version and all is well for the translation of the text, I still hang on against them ... Yes the picture are not going to be translated simply by language chosen, I would display pictures in the correct language. I try to retrieve the variable of the language but I do not know how .. I would say if the page on this ww.monsite.com/en/ displays the picture "english.jpg" But how do you know that the page is in English or German? I tried this <?php $monUrl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['HTTP_REFERER'].$_SERVER['SCRIPT_NAME']; echo"$monUrl"; ?> But it returns me this ww.monsite.com/index.php Do you have any idea? Thank you in advance for your help Steve
Re: What is the variable of language translation to change p
Dec 6, 2013 7:12 pm by Yana
Hi, For the GTranslate Pro General version use is $_GET['glang'] variable to detect current language. For GTranslate Pro Joomla system plugin it is JSession::get('glang');
Re: What is the variable of language translation to change p
Dec 6, 2013 7:29 pm by yule
So I tried this <?php if ($_GET['glang']=="it"){ echo"yes"; } else{ echo"no"; } ?> and it does not work? I also tried like this but it does not show me anything <?php $lang = $_GET["glang"]; echo"$lang"; ?> I do something wrong? A + Steve
Re: What is the variable of language translation to change p
Dec 7, 2013 6:25 am by yule
It's ok with RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&glang=$1 [L,QSA] RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&glang=$1 [L,QSA] See youy Steve
Re: What is the variable of language translation to change p
Dec 7, 2013 5:09 pm by Yana
Thank you for the information.

SIMILAR TOPICS

Large numbers of crawl errors with double language codeJan 24, 2019 1:43 amReplies: 1Post by: natastna2
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
German translation changes the centuryDec 31, 2018 3:06 pmReplies: 1Post by: adrievdl
Graphic translation for every language is missingDec 19, 2018 7:54 amReplies: 1Post by: Daryl Dixon
How to remove mobile Language Select Button transparencyDec 5, 2018 10:06 pmReplies: 10Post by: JeffTR

Try GTranslate with a free 15 day trial