Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter rhpg

    (@rhpg)

    That’s it Dragos, now it finally works! Thank you so much, you just made my day 🙂

    Thread Starter rhpg

    (@rhpg)

    Dear Dragos, please let me know what I can do to hide the active language flag.

    Thank you,
    Rob

    Thread Starter rhpg

    (@rhpg)

    Thank you Dragos. Unfortunately this doesn’t help…

    rhpg

    (@rhpg)

    Thank you FLorian for sharing your thoughts and screenshot. My preference settings were the same, except that I had flags instead of short names. Changing according to your settings didn’t help unfortunately. Also, our Extra CSS code is the same.

    Maybe there’s something wrong in my menu settings. Here I have 2 Language Switcher elements with (initially) the following settings:

    1:
    Label: Dutch
    CSS Class: trp-language-switcher-container tp_nl

    2:
    Label: English
    CSS Class: trp-language-switcher-container tp_en

    (this is what I enter, as explained the system ads to these CSS Class codes itself)

    Are these Menu elements and CSS Class entries the same as yours?

    Many thank for your help!

    Kind regards,
    Rob

    rhpg

    (@rhpg)

    Dear Florian, Dragos or colleague,

    I added tp-en resp. tp-nl as suggested in CSS Class field of the language switcher menu items, and added the following code in the Extra CSS:

    .translatepress-en_US .tp_en,
    .translatepress-nl_NL .tp_nl
    { display: none; }

    However, both flags remain visible. Something strange is happening in the CSS Class fields in the language switcher menu items:

    If I enter:
    trp-language-switcher-container tp_nl
    and close and re-open this field, it then says:
    trp-language-switcher-container tp_nl trp-language-switcher-container

    If I close and re-open again it says:
    trp-language-switcher-container tp_nl trp-language-switcher-container trp-language-switcher-container”

    So for some reason it keeps on adding “trp-language-switcher-container”. For testing purposes, I cleared these CSS Class fields in the menu and then only entered “tp-en”. If I close and re-open the field, it then says: “tp-en trp-language-switcher-container”

    I also had my website hosting provider look into this issue. He also followed the steps on https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/ but with the same outcome. They suspect that the code may be outdated.

    Can you please look into what the problem is? Or better: the solution!?

    Many thanks.

    Kind regards,
    Rob

    • This reply was modified 6 years ago by rhpg.
    rhpg

    (@rhpg)

    Dear Dragos or colleague,

    Just like Florian, I want to hide the active language flag in the menu of my 2 languages website (nl_NL and en_US). So I tried as explained on https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/.

    CSS Classes is checked, but I don’t know how to correctly edit my language menu items, adding a custom class. After adding the language switcher items to the menu, these CSS fields automatically contain: “trp-language-switcher-container”. I tried adding tp_nl and tp_en (like: “trp-language-switcher-container-tp-en”) but this doesn’t work.

    => How/where should I add tp_en and tp_nl in order to make this work?

    FYI: under Extra CSS I added:
    .translatepress-en_US .tp_en,
    .translatepress-nl_NL .tp_nl
    { display: none; }

    Thank you so much for your help, I’m really struggling with this

Viewing 6 replies - 1 through 6 (of 6 total)