• Resolved mango532

    (@mango532)


    is it possible to just translate some selected content like <div class=”content”></div> instead of whole page ?

    thank

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Robert Hanna

    (@robertdhanna)

    Hi mango532,

    That is an excellent question. Yes, we do support something similar. For content that you don’t want to be translated you can wrap it a div with the attribute translate=”no”. Here is an example:

    <div translate="no"><!-- excluded translating any text within this div -->
       <h2>Hello</h2>
       <p>Exclude this content from translation.</p>
    </div>

    The content inside the div will not be translated when the document is processed. Please let us know if you have any other questions!

    Hi @robertdhanna,

    In wordpress using div tags in editor is very annoying. Is it possible use span tags?

    <p>Exclude <span translate="no">this content</span> from translation.</p>

    If it is possible it will be huge life saver.

    Plugin Contributor Robert Hanna

    (@robertdhanna)

    @esahin,

    Yes, you should be able to use <span> tags instead of <div> tags to mark content that shouldn’t be translated. If it doesn’t work for you please let us know and we can look into it.

    Thanks,

    Please let us know if you have any more questions!

    Hi @robertdhanna,

    I tried span tags, but not working properly.

    This example is working;
    <span translate="no">Exclude</span> this content from translation.

    And this example not working, also span tags removed from translated content.
    Exclude <span translate="no">this content</span> from translation.

    Plugin Contributor Robert Hanna

    (@robertdhanna)

    @esahin,

    I’m not sure why that is happening. Let me ask a couple of questions to see if we can troubleshoot the issue.

    What do you mean by “also span tags removed from translated content”?

    Do you mean that “this content” is no longer wrapped in span tags, or do you mean that “this content” is removed from the translated document?

    Hi @robertdhanna,

    Thanks for support.

    I mean “this content” is no longer wrapped in span tags.

    So “this content” not removed but translated. Like the span tags never existed.

    Plugin Contributor Robert Hanna

    (@robertdhanna)

    @esahin,

    I’m not sure why that isn’t working for you. I’ll have to check with the developer in charge of our HTML filters. Using div tags should work in the mean time while we sort this out.

    Sorry for the inconvenience!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘just translate some content’ is closed to new replies.