What is the variable of language translation to change pictu

Popular automatic website translation tool

What is the variable of language translation to change pictu

Postby yule » Fri Dec 06, 2013 10:54 pm

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

Code: Select all
<?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
yule
 
Posts: 15
Joined: Fri Dec 02, 2011 5:07 pm

Re: What is the variable of language translation to change p

Postby Yana » Fri Dec 06, 2013 11:12 pm

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');
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: What is the variable of language translation to change p

Postby yule » Fri Dec 06, 2013 11:29 pm

So I tried this

Code: Select all
      
   <?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
Code: Select all
      
   <?php         
$lang = $_GET["glang"];   
echo"$lang";

   ?>   
   


I do something wrong?
A +
Steve
yule
 
Posts: 15
Joined: Fri Dec 02, 2011 5:07 pm

Re: What is the variable of language translation to change p

Postby yule » Sat Dec 07, 2013 10:25 am

It's ok with

Code: Select all

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
yule
 
Posts: 15
Joined: Fri Dec 02, 2011 5:07 pm

Re: What is the variable of language translation to change p

Postby Yana » Sat Dec 07, 2013 9:09 pm

Thank you for the information.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux