WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
Using Crayon with a WP Translator - HELP! (2 posts)

  1. Scott West
    Member
    Posted 1 year ago #

    I'm using the Crayon Syntax Highlighter with the Transposh WordPress Translation Plugin. The syntax is being translated into the desired language (ie. Spanish, French, etc.). I belive I can stop this by adding code (http://transposh.org/faq) just before and after the <pre> and </pre> delimiters.

    How do I or can Insert this code into the php coding so I dont have to manually insert it with each post?

    From the Tranposh FAQ Site:
    How can I prevent certain text from being translated?

    You can wrap the text with an HTML class of “no_translate“, for example:
    <span class="no_translate"> This text is not translated </span>

    You may also use the following shortcode when appropriate:
    [tp no_translate="y"] This text is also not translated [/tp]

    The code HTML tag will also prevent translation:
    <code> $this_code_won't_be_translated </code>

    Can anyone give me a little direction, Please.

    Thanks. Scott

  2. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Scott, a temporary solution would be to add that class into the Tag Editor code, so that the pre and span tags will have that class. A better solution will involve me writing a wp action for it. The class is created here:

    https://github.com/aramkocharyan/crayon-syntax-highlighter/blob/master/util/tag-editor/crayon_tag_editor.js#L429

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic