• Hi all

    I am running a MU site (www.graphenepartners.com) in two languages, and have successfully installed the Multisite Language Switcher plugin. Would just like to know how/where I can change the link colour and the flag (from US to British). I have changed my link colour in the theme options but this did not affect the MLS widget.

    Thanks in advance for your help ??
    Adam

Viewing 15 replies - 1 through 15 (of 15 total)
  • You can change the output of the widget (https://github.com/lloc/Multisite-Language-Switcher/wiki/Change-the-output) but it seems that the link color of elements in the sidebar aren’t handled. Maybe you have to talk with the theme-developer?

    If you want to use another flag you can setup alternative directory where you store them. Here you could rename the British flag for example.

    Cheers,
    Dennis.

    Dennis, me to I’d like to change the American flag to a British one. Can you tell us more about “set up an alternative directory” ? Sorry I have no idea what it means nor what I should do…
    Thanks in advance,
    Fran

    Yes, this is maybe not so clear. Let me assume that you have an directory in your theme which contains some flags you need (for a good starting point you could copy the flags from the Multisite Language Switcher in your directory), the name of the theme is “example-theme” and the name of the directory with the flags is “alternative-flags” … now you can insert a value like https://YOURDOMAIN/wp-content/themes/example-theme/alternative-flags/ in this field.

    Cheers,
    Dennis.

    Yes, but the British flag (gb) IS in your collection of flags, in your plugin. What happens is that on the frontend, the plugin deplays the American flag (us) for English language. I don’t see any possibility in the settings for choosing between US or British flag.

    Since the British flag is already in your plugin, I don’t see the point of pointing to new directory…
    Am I missing something here ?

    Or should I copy your directory to a new one and give the British flag the name “us” (???)

    Or should I copy your directory to a new one and give the British flag the name “us” (???)

    Actually it works ! Yeah! It’s not very academic to call a British flag “us”, so if you have a better way to propose…
    But if not, don’t worry, at least, it works this way LOL

    Thanks for your attention, Dennis
    Fran

    This is one possibility … if you prefer a more cleaner solution you could create an en_GB language file, install it in your language folder and activate it as language for one of the blogs in your network. But the “us”-solution is quicker of course.

    yes the en_GB solution works – thanks for the excellent plugin.

    I have the same issue, and I don’t really understand the solution. Can you please give some more details ?

    I was thinking that I could chose the flag with the option “Custom URL for flag-images” but this doesn’t work. I inserted “https://mydomain/wp-content/plugins/multisite-language-switcher/flags/gb.png” and instead of this I get in the source code : “https://mydomain/wp-content/plugins/multisite-language-switcher/flags/gb.png/us.png”. So obviously it doesn’t find the flag…

    Is this a bug ?

    Also, when I click on the flag it opens the translated website in a new window (though only when going English=>German, German=>English is ok). Do you know why that happens ? How can I fix it ?

    Thanks !

    No this is not a bug.

    I wrote “Custom URL for flag-images” so it should be a directory … you noticed already that the plugin changes your URL “https://mydomain/wp-content/plugins/multisite-language-switcher/flags/gb.png/us.png“.

    You can – of course – create your own directory (in your theme-directory for example) and rename there the gb-flag to us.png. This is a “quick and dirty” solution if you prefer the Union Jack as flag for the English language.

    Regarding the link … I don’t know what you mean. The generated link is always the same:

    <a href="https://lloc.de" title="Deutsch"><img src="https://lloc.de/it/wp-content/plugins/multisite-language-switcher/flags/de.png" alt="de_DE"/> Deutsch</a>

    It depends how you configured the plugin but there is no target defined if you mend something like that. There is a way to change this behavior but you’ll have to write your own code for this.

    Cheers,
    Dennis.

    Thanks for the help Dennis. Ok, I get the quick and dirty solution, I wanted to understand the other one you were talking about though, which is cleaner (with the en_GB file). Can you please give some detail on that ?

    As for the link, I indeed have a code like the one you give. However it opens the link in a new tab. I don’t understand why it behaves this way. What code to I need to write for this ?

    You could create an empty file named en_GB.mo in wp-content/languages/. And then set the language in “General Settings”. After this the flag should be the British one.

    Regarding the link: I believe that you have installed a plugin that opens links in a new window. You don’t have to write any code … I mend that you have to add code if you want to open the links in a new window.

    ok for the openning in a new window it’s an issue with another pluggin, don’t mind about this sorry.

    Only the other problem left ??

    You already tried what I suggested? ??

    Ah, sorry, our answers crossed over…

    That worked, thanks !

    Excellent! ??

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Multisite Language Switcher: change link colour and flag’ is closed to new replies.