• Hi,

    I can’t seem to be able to place the WPML Language Switcher in any of the widget areas – no matter which one I place it in, the Language Switcher just doesn’t display!

    The most ideal location for the Language Switcher for me would be in the top right-hand corner, where the Site Tagline is currently located.

    Is it possible to place the Language Switcher there if I remove the tagline? The code for the switcher is

    <?php do_action('icl_language_selector'); ?>

    I am using Customizr version 3.1.5 and WPML version 2.2.2.1.

    Thanks a lot,
    Juraj

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi Juraj, thanks for reporting this. I am gonna work on a fix for that.
    Now in the to do list of theme improvements.
    Thanks

    You might want to take a look at this post, which explains how to do this for qTranslate. I should imagine that the same principles hold for WPML too.

    Let us know if it works.

    Thread Starter Juraj Petruska

    (@juraj-petruska)

    Hi ElectricFeet,

    thanks for the tip.

    This option works but I have to add the links to respective languages in the main menu – I have not found a way to put them in another menu and enable them somewhere else on the visible page – is this possible?

    Also, the image option described for qtranslate does not work for me – every time I put the code <img src="localhost/wp/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png" alt="English" >, for some magical reason, wordpress reduplicated the source url and adds http in front of it: https://localhost/wp/localhost/wp/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png

    Anyways, if I hardcode the the url into the top menu, it will only take me to the homepage for the respective language. Is there a workaround so that I can change the language for a specific page, but still remain on the page?

    Nico, I really appreciate that.

    Thanks guys,
    Juraj

    There’s a snippet here that shows you how to add another menu in Customizr. Everything I said in the post link above should work just as well for a secondary menu.

    In fact, wow, that’s a new solution 4, isn’t it! ??

    For your localhost problem, what happens if you add https://127.0.0.1:8080/wp/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png instead? 127.0.0.1 (the IP of everyone’s own computer) is the same as Localhost. Alternatively, https://localhost:8080/wp/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png should probably work too. (It’s possible (but unlikely) that you may be using a port other than 8080, in which case it won’t work.)

    Thread Starter Juraj Petruska

    (@juraj-petruska)

    Thanks again.

    The secondary menu works splendidly, but I don’t know how to assign a specific style to it. I’d like to assign the same CSS to it that the main menu at the top has.

    Since I use XAMPP, the Listen is set to 80 by default. You can either change this value to 8080 in httpd.conf, or use url https://localhost:80/wp/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png.

    What I might still need is a way to change language, but remain on the same page.

    Cheers,
    Juraj

    If you want to remain on the same page, then the menu solution won’t work. You will need to use solution 3 in the linked post above. The hope is that you should be able to substitute icl_language_selector for qtrans_generateLanguageSelectCode in the functions.php code I pasted.

    No guarantees it will work for WPML, though.

    Or why don’t you just use this plugin?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WPML Support and Language Switcher’ is closed to new replies.