Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-1499

Adding Google Translation to Development Docs

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Component/s: docs.moodle.org
    • Labels:
      None

      Description

      I know people poo-poo the quality of Google translations but I still think it would be a good idea to provide some way to easily generate a translation on-the-fly of all the English docs.

      Let's start with the Development docs at least, to try it out. There are no official translations anyway.

      All we need to do is insert this somewhere near the top:

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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            An example of what it looks like (and where I got the code): http://www.jhische.com/twitter/

            Show
            dougiamas Martin Dougiamas added a comment - An example of what it looks like (and where I got the code): http://www.jhische.com/twitter/
            Hide
            jtomkinson Jordan Tomkinson added a comment -

            Quickly hacked this into the theme to display as a nav block, it appears to have broken the links above the wiki page (article, page comments, history, etc..)

            its on the docstest site: http://docstest.moodle.local/20/en/Main_Page

            Show
            jtomkinson Jordan Tomkinson added a comment - Quickly hacked this into the theme to display as a nav block, it appears to have broken the links above the wiki page (article, page comments, history, etc..) its on the docstest site: http://docstest.moodle.local/20/en/Main_Page
            Hide
            tsala Helen Foster added a comment -

            Unfortunately I can't access http://docstest.moodle.local/. How about using http://docs.moodle.org/test/ for testing docs stuff.

            Show
            tsala Helen Foster added a comment - Unfortunately I can't access http://docstest.moodle.local/ . How about using http://docs.moodle.org/test/ for testing docs stuff.
            Hide
            jtomkinson Jordan Tomkinson added a comment -
            Show
            jtomkinson Jordan Tomkinson added a comment - http://docstest.moodle.com/
            Hide
            poltawski Dan Poltawski added a comment -

            Still want this Martin?

            <meta name="google-translate-customization" content="5febb1ec16f66be4-4f4358e584b5eb78-g557c5396cfdc4bc5-13"></meta>
            {code
            
            

            <div id="google_translate_element"></div><script type="text/javascript">
            function googleTranslateElementInit() {
            new google.translate.TranslateElement(

            {pageLanguage: 'en', 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>

             

            Show
            poltawski Dan Poltawski added a comment - Still want this Martin? <meta name="google-translate-customization" content="5febb1ec16f66be4-4f4358e584b5eb78-g557c5396cfdc4bc5-13"></meta> {code <div id="google_translate_element"></div><script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement( {pageLanguage: 'en', 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>  
            Hide
            poltawski Dan Poltawski added a comment -

            Tentatively closing this won't-fix

            Show
            poltawski Dan Poltawski added a comment - Tentatively closing this won't-fix

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: