You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 06-08-2013 06:48:43

Enmax
Contributors
From: Czech Republic
Registered: 31-07-2013
Posts: 10
Website

How and where can I insert Translator widget, if any, possibility is?

Good day, Please advice

How and where can I insert Google Translator widget, if any, possibility is?

Or can you recommend another translator that would translate my site (with Metro template) from Czech to English and other.

Please reply (if also whether it is not possible)

Last edited by Enmax (06-08-2013 19:10:16)


Per aspera ad astra
--------------------
Enmax.cz - films online (CZ)

Offline

#2 09-04-2014 11:42:53

Anastacia
Contributors
Registered: 31-03-2014
Posts: 5

Re: How and where can I insert Translator widget, if any, possibility is?

Interested in this too. Is is possibe?

Thanx

Offline

#3 09-04-2014 19:58:49

chrismaliszewski
Contributors
From: Torun, Poland
Registered: 06-05-2013
Posts: 246
Website

Re: How and where can I insert Translator widget, if any, possibility is?

Solution:
1. Go here and get code for your widget (in final step).
2. Modify index.php/mobile.php by adding in <head> meta tag from final step of creating widget similar to this one:

<meta name="google-translate-customization" content="SOME_CODE"></meta>

3. Create a custom tile in config/tiles.php similar to this one:

$tile[] = array("type"=>"custom","group"=>4,"x"=>0,"y"=>4,'width'=>1,'height'=>0.5,"background"=>"#000",
"content"=>'<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: "eo", layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, "google_translate_element");
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>'
);

Make sure that "content" of custom tile is code given you by Google in final step! You'll need to change ' / " to proper ones.

That's all - it works for me at least.

Cheers.

Offline

Board footer

Powered by FluxBB