[resolved] [Plugin: Google AJAX Translation] Translation stops upon reaching SyntaxHighlighter code block (5 posts)

  1. baby_wilson
    Posted 6 years ago #


    The translator works for the content up until it reaches the first instance of a code block processed by the SyntaxHighlighter plugin.

    Please see: http://brian.dobberteen.com to view an example.

    Any fixes for this?



  2. monodistortion
    Posted 6 years ago #

    I looked at your site.

    The problem only shows up on some of your posts and some work fine like this one:
    but the result is that it translates the code also.

    The problem is somewhere in the jquery translate plugin where it stops for some reason.

    This problem could be fixed by modifying the JavaScript to skip the divs where class="syntaxhighlighter ". The jquery translate plugin has an easy way to do this but it would take some extra work to add an option for the administration panel.

    If you want to experiment try opening the file jquery.translate-1.3.9.min.js and find:


    near the end and change that to:

    not:".translate_block, .syntaxhighlighter"
  3. baby_wilson
    Posted 6 years ago #

    Thanks so much for the guidance! The solution offered worked perfectly!

    Thanks again!

    - baby_wilson

  4. natenewz
    Posted 6 years ago #

    This fix also works for a similiar problem using google-code-prettyify plugin. This may be a good option for the administration control panel.

  5. monodistortion
    Posted 6 years ago #

    Yes, when I saw this problem I considered adding an administration option for it but it's getting a little advanced and I'm not sure how common this problem is.

    For you I think you can change that part to:

    not:".translate_block, pre"

Topic Closed

This topic has been closed to new replies.

About this Topic