Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD] Translate site block w/ Google tra
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2012-02-02 10:56:21
This is a block that displays the google translate option. Choosing any language would immediatelly translate your site to that language. Its not perfect but works fine!

Create a file and call it -> translate_block.php and put the following code inside:



<?php

if (!$site_config["MEMBERSONLY"] || $CURUSER) {

begin_block("Translate");?>

<center>

<div id="google_translate_element"></div><script>

function googleTranslateElementInit() {

 new google.translate.TranslateElement({

pageLanguage: 'en'

 }, 'google_translate_element');

}

</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

</center>

<?end_block();

}

?>



Now upload to /blocks/ and add block from admincp and test it out.

You can download the file here:

Enjoy[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5539"]translate_block.php[/url]
translate_block.php
Download
Unknown User
2012-02-03 07:06:55
nice this might help on the users that say they so call cant read the rules cause cant read default language
Unknown User
2012-02-03 10:23:32
yeah lol good point :lol:
2012-02-25 13:50:20
I love you google hahahha  :D

...thanks dent :)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728