• Resolved avviano

    (@avviano)


    First off, thank you for creating a very cool translator plugin. I have worked with others as well and I really love yours the best.

    Regarding my issue (with the switcher):

    I am not sure why this is, but normally a switcher (lets take flag for example) would display the flag not of the current language, but the language I can switch to. No matter how I use the switcher, it only shows me the flag of the current (default) language!

    Who on earth would want to switch to a language that is already displayed on the website? It absolutely makes no sense!

    No matter who I showed the website to in my focus group of about 20 people, almost every one complained they could not find their language (because they only saw the language of the current website).

    Same goes for the floating menu. Its such a shame that it is currently unusable, because it only shows the current language until you click on it. Again, all visitors in my focus group did not realize they had to click on the current language to get the other languages. Quite honestly, it also doesn’t make much sense the way it is now…

    So if my site is displayed in German by default, the flag in the switcher should show the English flag by default, not the German one. If people want to switch languages, they obviously need the other one not the translation currently displayed on the site.

    I understand it might make sense if more than two languages are available, but it certainly makes no sense if you only have two languages (which is probably the case for the majority of websites). Although, showing the flag of the current website makes no sense to me in either scenario.

    QUESTION: How can I tell translate press to only show the flag(s) of available languages BUT NOT THE ONE CURRENTLY IN USE??? In want to show it in reverse. This would be the logical way of displaying language option. Show all except the one already displayed. They way it is done now, it confuses people big time.

    Cheers!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter avviano

    (@avviano)

    BTW: I did follow you instructions for reversing the order on your help page “Show opposite language in language switcher”.

    https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/

    But none of your instructions worked for me. I installed (2) the plugin and (1) followed the instruction for custom css (these instructions are very confusing BTW), both procedures did not work for me. I still have both flags showing both 1.) in my main menu and 2.) in the floating switcher.

    It really amazes me, that such a basic feature is so complicated and confusing to implement.

    Why not add this important feature natively to translate press? In fact, you don’t need to add any options or extra items in preferences. Just add code to your plugin so that when two languages are in use, only the opposite flag is shown. Anything else really doesn’t make any sense.

    Anyway, I would still need to know how to resolve the issue. Thanks.

    Hi there,

    I’m sorry you had trouble with the way our plugins works.
    The reason it works like this is because TranslatePress was made with the idea of building a multilingual website. It’s as you said, it makes sense to work this way when there are more than two languages.
    But yes, I understand your frustration when it comes to a bilingual site.

    There are two solutions I can think of:

    1) The first one is the one you already tried “Show opposite language in language switcher” https://translatepress.com/docs/developers/show-opposite-language-in-language-switcher/

    This should work so I’ll provide some pictures hoping that it will make things clearer.

    Here is an image covering the first two bullet points https://drive.google.com/file/d/14-0vVHxUL9mkFdGl4L2G5VWICI745a13/view?usp=sharing

    The first bullet point [go to Appearance -> Menus -> Screen Options (top right corner) and make sure “CSS Classes is checked”] is shown in the top of the image (between the circled number 1 and the other 3 circled numbers). You need to check the shown button.

    The second bullet point (next, edit your language menu items, and add for each language a custom class: tp_en for English, tp_fr for French, etc. You won’t be needing the “Current Language” item.) is shown below the 3 circled numbers.

    Circled number 2 shows that you only need to choose the 2 language menu itmes that you want to display on your site (you don’t need the current language menu item).

    Circled number 3 shows the CSS_class you need to add to each language menu item. I recommend you to delete the existing text (if any) before you insert your CSS class.

    Circled number 4 shows how the 2 menu itmes will look after you saved the menu. Translatepress should automatically add the “trp-language-switcher-container” class after you saved the menu (hence why you should have it empty before inserting your class).

    The next picture (https://drive.google.com/file/d/15m8CsT6MmCbgpUWVCBbulKm8JRem-9-I/view?usp=sharing) covers the 3rd bullet point (now, you can go to WordPress -> Appearance -> Customize -> Additional CSS and add some custom CSS like). You need to add the following CSS to your template:

    .translatepress-en_US .tp_en,
    .translatepress-de_DE .tp_de
    { display: none; }

    I hope these images made following the instructions a bit more clear.

    2) The second solution requires you to have the Navigation Based on Language add-on. This will do exactly what you want.

    I know that the second solution is not really a solution, that’s why I recommend you to give the first solution another try.
    Be careful with the circled number 3 and number 4, it seems like sometimes TranslatePress doesn’t add your class or it adds to many “trp-language-switcher-container” classes.

    Best regards,
    Cristian

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Switcher Function not Logical’ is closed to new replies.