How to add GT manually?

Popular automatic website translation tool

How to add GT manually?

Postby poloplayer » Mon Apr 25, 2011 10:18 am

Hi there,

Since the last update I can see a message in admin:

DO NOT COPY THIS INTO YOUR POSTS OR PAGES! Put [GTranslate] inside the post/page
or add a GTranslate widget into your sidebar from Appearance -> Widgets instead.


Does it mean I can not add PHP or JS code manually into my wordpress page/header? I have a specific place in WP where I can not use [GTranslate] or widget area and I was wondering if there is any way to add GT manually. Otherwise the whole plugin is useless for my sides and I have to look for some alternatives.

Thanks
poloplayer
 
Posts: 3
Joined: Mon Apr 25, 2011 10:08 am

Re: How to add GT manually?

Postby Edvard » Tue Apr 26, 2011 1:40 pm

You can put it in the php files if you want. Wordpress formats the input and it is not always true that you will get exactly the same in the source code. You need to check the source code to see if you have the same output.
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: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to add GT manually?

Postby poloplayer » Wed Apr 27, 2011 7:03 am

Thanks Edvard for the hint. Do you have by any chance a possible PHP code for GT to include in my WP template page? Sorry I'm not a programmer. Thanks a lot
poloplayer
 
Posts: 3
Joined: Mon Apr 25, 2011 10:08 am

Re: How to add GT manually?

Postby Edvard » Thu Apr 28, 2011 4:11 pm

You can include HTML inside PHP. To do that you just need to close the php ?>, paste the HTML, open php <?php ...

Ex. your template file:

Code: Select all
<?php
....
....
....
?>
GTranslate HTML
<?php
....
....
....
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: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to add GT manually?

Postby poloplayer » Fri Nov 25, 2011 1:34 am

Hi Edvard,

I need to add gtranslate to my WordPress template using js. or php as I did with the gT old version here:
http://www.voicerr.com

Would it be possible using function exists e.g.

Code: Select all
<?php
if(function_exists("gtranslate")) {
gtranslate();
}
?>


If not then how can I include your code in my WP php template page not using [gtrans] ?

Thanks
poloplayer
 
Posts: 3
Joined: Mon Apr 25, 2011 10:08 am

Re: How to add GT manually?

Postby Edvard » Fri Nov 25, 2011 4:18 pm

You can do this way echo do_shortcode('[gtranslate]');

http://codex.wordpress.org/Function_Ref ... _shortcode
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: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to add GT manually?

Postby mstolp » Mon Nov 28, 2011 7:41 am

Hi Edvard, I want gTranslate Pro to appear in upper right corner of each page.

I am not clear what js code to insert into header.php and formatting in styles.css to make that happen.

Any suggestions?
Thank you.
Mike
mstolp
 
Posts: 6
Joined: Mon Nov 28, 2011 5:35 am

Re: How to add GT manually?

Postby Edvard » Mon Nov 28, 2011 4:10 pm

You need to use PHP to insert it. Please read the previous post.
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: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron