dopetalk

Technology => SMF Forum Code Modifications => Topic started by: Chip on March 18, 2018, 10:48:10 PM

Title: Quick Translation
Post by: Chip on March 18, 2018, 10:48:10 PM
https://custom.simplemachines.org/mods/index.php?mod=2794

The modification can be used to translate messages in all languages provided by the Google Translator Toolkit.

Code: [Select]
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

needs new_hooks.zip

in dev soon

manual code changes to:

/Themes/default/Display.template.php and /Themes/core/Display.template.php

find:
Code: [Select]
// Assuming there are attachments...
if (!empty($message['attachment']))
{

replace with:
Code: [Select]
// Assuming there are attachments...
if (!empty($message['attachment']))
{
// Allow change attachments output
call_integration_hook('integrate_attachments', array(&$message));
SimplePortal 2.3.6 © 2008-2014, SimplePortal