• Resolved scorpioc3

    (@scorpioc3)


    Hello

    I have a problem when translating specific strings:

    I want to use DIV CLASS in order to control the font of the translated language text. I have managed to make it work with some strings but for some reason other strings won’t recognize the HTML code I wrote and they render it as a text instead.

    Here is an image that shows how I want the HTML to be rendered:
    https://i.ibb.co/7zMd93b/HTML-code.png

    And here is an image that shows how the string is shown:
    https://i.ibb.co/y5P0rPP/HTML-result.png

    Is there any solution available to fix this problem? Since I want to use SPECIFIC CSS CODE to apply for the translated language font.

    Please note that the exact same HTML code in the images above worked for some other strings but for some reason as mentioned it’s not working for all of them which makes me believe that there might be a solution or a workaround for it.

Viewing 1 replies (of 1 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    If you want to have a different font for different languages I recommend you to use the .translatepress cording to your additional language.

    Let’s take an example. Let’s say your additional language is Spanish, then the .translatepress-es_ES class can be called for the Spanis language. You can do it by adding some code in Appearance –> Customize –> Additional CSS.

    Basically, you need to specify the language class, and also the element class that you want to be changed (if you want to change that font only for a particular element).

    Here is an example of how the code should look like:

    body.translatepress-es_ES .particular_element {
    font-family:"Padauk" !important; 
    }

    Best Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘HTML codes/tags are not rendering’ is closed to new replies.