[Resolved] Translatepress language switcher

Home Forums Support Translatepress language switcher

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1270401
    Matthias

    Hi there,

    i am trying to add the translatepress plugin language switcher – and have it look in a decent way.

    There are 3 Options to add as described here:
    1. choosing in the backends plugin settings to have a floating switcher
    2. adding shortcode [language-switcher] into a page or widget. This for me looks like the floating switcher – a dropdown selection but as it says on a page of widget.
    3. to a menu -> which adds a menu entry with the class trp-language-switcher-container

    Personally i think the first 2 look… lets say – not so good.

    So i added Option 3.

    Now i would like to have them on the most right side (currently they are the last items – but the search is the farmost right).
    Also i would like to have them close to each other – and not as far apart as the other menu entries – and as i use language shortcodes – i would like those to be separeted by a line |
    Hope you know what i mean.

    So currently it looks like (dots are space between entries)

    Home…..Entry1…..Entry2…..Language1…..Language2…..Search

    I would want

    Home…..Entry1…..Entry2…..Search…..Language1|Language2

    is this possible?

    #1270504
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to your site so i can take a look if its possible?
    You can edit your original topic and use the Site URL field to share the link privately.

    #1270717
    Matthias

    i added the link to the start post.

    #1270726
    David
    Staff
    Customer Support

    Try adding this CSS:

    .nav-aligned-right .main-navigation .menu>li.trp-language-switcher-container {
        float: right;
    }
    #1270841
    Matthias

    that made them flow to the right. nice

    Is there a way to put them closer together? And add a line as separator in between?
    Currently they got the same gap as the other menu items.

    #1271271
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can bring them closer together like this:

    .main-navigation .main-nav ul li.trp-language-switcher-container a {
        padding: 0 5px;
    }

    You’d need to add another class to the menu item that needs a border, as there’s no way to select just one of them.

    #1271769
    Matthias

    even nice. Now both language names are where i want them – looking like:

    Menu Search EN DE

    now i “only” want to go to

    Menu Search en|de

    So – from big to small letters and with a separator line. Also i want the active language shown in a certain color.

    As this is in my opinion is going quite into plugin territory I already submitted a ticket there since i bought it.

    If i get a solution i will post it here. But if you want feel free to add you 2cents.

    #1272406
    Tom
    Lead Developer
    Lead Developer

    For the separator, you’d need a unique class added to the menu item you want to apply it to.

    For the active language color, that menu item would need to have a class added to it so we know it’s active – it doesn’t look like that happens right now. The plugin devs should be able to help with this one.

    #1285418
    Matthias

    can i ask a quick follow up?

    sadly the support of this plugin isn’t very good – aka not responding to tickets. Which happened to me twice now since i bought this. Not really as advertised – and so definitely no command from me if anyone thinks about trying this.
    I am thinking to switch to wpml when the update period ist running out (which – as i beeing annoyed discovered when looking for this has also support in an open forum).

    Anyways – until then:
    i made it to look quite similar to what i want – but now my non-existing try-and-error coding skills are at its limit.

    is there a way to change the switcher entries?
    meaning: currently in my menu you can see a dropdown:
    EN
    DE

    is it possible to change it from capital to small letters:
    en
    de

    ?

    #1285464
    David
    Staff
    Customer Support

    Try this CSS:

    .trp-ls-language-name {
        text-transform: lowercase;
    }
    #1285933
    Matthias

    that doesn’t seem to work.

    #1285940
    David
    Staff
    Customer Support

    Where did you add it?
    Also i suggest you disable your autoptimize and check your site in an incognito/private browser as it has no cache.

    #1286061
    Matthias

    i added it to style.css of child theme.

    Autooptimize is disabled now – sorry.

    I tried with chromium incognito and firefox private – its also still capital there.

    #1286514
    Tom
    Lead Developer
    Lead Developer

    In the CSS above it, you’ve opened a comment (/*) but didn’t close it:

    /* .main-navigation .main-nav ul li.trp-language-switcher-container a {

    You need to close that comment or any CSS below it won’t be read.

    #1287095
    Matthias

    ok – that was embarassing. i actually did close the comment – but before the }

    it works perfectly with the code David provided.
    thx a bunch. Topic resolved 😀

    And happy 6th. We will for sure extend our license. And as we bought it at the end of the year we will gladly do so no discount needed – i can tell you that already. Worth every penny.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.