PHP Includes & Joomla w/ GTranslate Pro

Popular automatic website translation tool

PHP Includes & Joomla w/ GTranslate Pro

Postby technicaldaniel » Fri Aug 26, 2011 2:54 pm

I am currently running GTranslate on my Joomla 1.5 installation, but I also have a PHP/JS/HTML module which allows me to put PHP, etc. on my pages which is essential for my sight. I use this functionality to call external PHP files on my domain which contains the website data. This works really well however when I try and use GTranslate Pro (Redirect), none of the PHP parts translate. However when I use the 'Google Default' method, it translates perfectly.

Is there a way I can make it work with the Redirect method? Any help would be much appreciated. :)
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby Edvard » Fri Aug 26, 2011 10:44 pm

Do you use javascript to call the external data?

When you check the source code of your site, do you see the included content?
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby technicaldaniel » Sat Aug 27, 2011 3:22 am

Yes the site does have some JavaScript load() functions in it.
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby Edvard » Mon Aug 29, 2011 3:53 pm

The Pro version doesn't translate the content loaded by javascript, because it makes the translation before any javascript is fired. However you can modify your javascript to add language code in the load URL and it will load the translated data. In this case the data need to be called from the same server where the Pro version is installed.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby technicaldaniel » Mon Aug 29, 2011 4:16 pm

Well the loaded code from JavaScript is on the same server, but just in a separate directory. Could you possibly give me an example on how to do that because I have no idea how to add language code in a load() call.

Thanks for the help regardless.
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby Edvard » Tue Aug 30, 2011 3:16 pm

Well it depends on your code. I can just give you a hint. If you load data let's say from http://domain.com/my_data_path.php you need to change the javascript to load it from http://domain.com/XX/my_data_path.php where XX is the current language.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby technicaldaniel » Tue Aug 30, 2011 3:23 pm

Okay I can see how that would work, however how do I set it to be set to the the language the user selected? Is there a php variable I can use?
technicaldaniel
 
Posts: 9
Joined: Wed Aug 03, 2011 7:40 am

Re: PHP Includes & Joomla w/ GTranslate Pro

Postby Edvard » Tue Aug 30, 2011 3:46 pm

Here you can find how to do that: gtranslate/url-language-code-t320.html?hilit=glang
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux