New and Featured labels translation

This topic contains 6 replies, has 3 voices, and was last updated by  Alex Rollin 6 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #427774

    jotomas
    Buyer
    Post count: 802

    Hi,

    I have found this documentation about this subject:

    https://wpgeodirectory.com/docs/faqs/translate-new-and-featured/

    My question is how to translate to different languages, since I am using WPML to have my GD site in four languages.

    I look forward to your reply.

    Thank you very much for your attention.

    Best regards.

    #427800

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    The best way would be to add the language as a body class and then u can target it with CSS for each language.

    Stiofan

    #428400

    jotomas
    Buyer
    Post count: 802

    Hello Stiofan,

    I still do not know almost anything about CSS. I had no time to learn.

    I expected to be able to find some time to investigate and learn about how to do what you said, but as of now I could not.

    Would it be too much to ask you to detail the CCS or snippet I should use? 🙂

    Thank you very much once again for your help.

    Best regards.

    #428431

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    WPML may have a newer way of doing this, but here is an old forum post about it, untested: https://wpml.org/forums/topic/body-class-based-on-language/

    Please contact WPML about support for the body class.

    Thanks

    #428583

    jotomas
    Buyer
    Post count: 802

    Hi Alex,

    Thanks a lot!

    I have opened a support ticket with WPML.

    Best regards.

    #429191

    jotomas
    Buyer
    Post count: 802

    Hi,

    This is the response from WPML. I have tried it, adding the CSS to “GD – Design – Scripts – Custom Style CSS Code”, and it works!


    To solve this problem you will need to follow this steps:

    – Add this CSS code to the style.css file in your theme’s folder:

    .geodir_new_listing:lang(es) {
    background: url(‘http://reference to your new image in Spanish’) no-repeat scroll left top transparent;
    }
    ul li .geodir_featured_img:lang(es) {
    background: url(‘http://reference to your featured image in Spanish’) no-repeat;
    }

    Note: You will have to do this for each language. The difference will be the language code in the :lang() pseudo class and the address of the image.

    For more information regarding this CSS pseudo class you can visit this link: https://css-tricks.com/almanac/selectors/l/lang/

    Best regards.

    #429212

    Alex Rollin
    Moderator
    Post count: 27815

    Fabulous!

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount