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:
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]
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]
