Skip to content

Avoid translation of sample code fragments with Google Translate #1954

Closed
@capicuadev

Description

@capicuadev

The sample code fragments enclosed with <pre> tags are translated along with the rest of the document when using translation tools such as Google Translate.

Please, it's important to solve this for people whose languages ​​are not available in the documentation. It's easily solved by enclosing the code with a <code> tag in place or together with the <pre> tag. This would also give you correct semantics. If for some reason you do not want to use the <code> tag, the alternative option would be to use the class notranslate or skiptranslate on the <pre> tag, like this: <pre class="notranslate"> or <pre class="skiptranslate">. Both solutions work correctly, avoiding translation.

(Sorry for my english...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions