<?php
/**
* Screen Google translate class
* --
* to use:
* --
* <?php echo sgt::code();?>
* --
*/
class sgt
{
/**
* Return the google trsnalte code as a test string that can be used in a template.
* --
* @return [type] [description]
*/
public static function code()
{
return '
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: \'en\', autoDisplay: true, multilanguagePage: true}, \'google_translate_element\');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
';
}
}