Page 1 of 1

Block with flags to choose language

Posted: Wed Oct 25, 2017 12:22 pm
by meteocaldas
I know that in MT anyone can choose the preferred language just by clicking on the tools icon, then choose country flag and then click OK. It is quite simple and intuitive and no one can complaint about this excelent solution.
I also know that the vast majority of Meteotemplate users have native english language sites, so in a certain way, they will never have their users needing to change languages, or in the rare cases they will need to do so, the tools icon can be used for that.
But.... in my particular case (and probably also in the majority of the MT weather sites located in touristic areas), it would be much easier for tourists visiting the site, to see a small block displaying 4 or 5 flags, (corresponding to the nationalities of the main touristic groups) and just click on the preferred flag, to have an immediate display of the site's homepage in that preferred language.
This idea came out after 2 days of testing MT on a dedicated public service computer, located in the tourism office of my town. Since default is portuguese language, I noticed that very few non portuguese users tried to figure out, how to switch to their own language. The majority of them just took a glance of the portuguese home page, guessing the forecast just by looking at the numbers and icons :-)
The few ones that achieved to switch language trough the tools icon, took a much longer time visiting the site and exploring other pages, and that is in fact, the main goal of any site owner!
This also aplies for common world wide site visitors that come trough google search. The home page opens in portuguese and google asks if you want it translated, but... if there was a flag block it would just take a click to switch to any of the other main languges.

So, my question is:
Would it be possible to create a simple block with up to five flags to switch between languages just with a click?
Would such block be of great interest for anyone else other than me? :-)

Image

Re: Block with flags to choose language

Posted: Wed Oct 25, 2017 12:25 pm
by Jachym
Hi,
yes technically possible, I like the idea, I will put it on my to-do list

Re: Block with flags to choose language

Posted: Wed Oct 25, 2017 12:34 pm
by meteocaldas
Jachym wrote: Wed Oct 25, 2017 12:25 pm Hi,
yes technically possible, I like the idea, I will put it on my to-do list
Thank you soooo much Jachym!

Image

Re: Block with flags to choose language

Posted: Thu Oct 26, 2017 10:52 am
by Jachym
Done, see Blog

Re: Block with flags to choose language

Posted: Fri Oct 27, 2017 12:57 pm
by meteocaldas
Thank you soooooo much Jachym.
The new block is simple and perfect, could't be better!

Image

Re: Block with flags to choose language

Posted: Sat Oct 28, 2017 7:25 pm
by iatros
Good idea, I agree, thank you Jachym!
Could it then be possible to hide the icon in the header which allows more languages? If I uncheck the user option "allow users to change language" in the main setup , the block does not work anymore.
Martin

Re: Block with flags to choose language

Posted: Sat Oct 28, 2017 7:27 pm
by Jachym
Hi,
no this will not work, this would require making changes to the core template file, impossible to do in the block

Re: Block with flags to choose language

Posted: Sun Oct 29, 2017 10:10 am
by Reinhard
Too bad.

Now I understand that it is not working on my site.

Re: Block with flags to choose language

Posted: Sun Oct 29, 2017 10:12 am
by Jachym
Although to be quite honest I dont really see a problem with having the flags in the settings dialog, 99% of people dont open it anyway and will use the block. And those who will will simply see it

Re: Block with flags to choose language

Posted: Sun Oct 29, 2017 10:42 am
by Reinhard
To be honest, too: I do not see the need to place a block somewhere on the homepage when there is a possibility to do the same via a setup button. For me (maybe only for me :D ) such a block makes sense because I want the visitor to choose from the languages I offer - no other options. But, as mentioned before, this is only my opinion. ;)

Re: Block with flags to choose language

Posted: Sun Oct 29, 2017 10:48 am
by meteocaldas
Jachym wrote: Sun Oct 29, 2017 10:12 am Although to be quite honest I dont really see a problem with having the flags in the settings dialog, 99% of people dont open it anyway and will use the block. And those who will will simply see it
I agree and the settings dialog has the advantage of showing all the other languages that are not displayed in the lang switcher block, giving the user the possibility of switching to any of those languages if he prefers to do so.
So we can say that the langSwitcher block serves just as a useful shortcut to the main languages that are used in our sites.

Image

Re: Block with flags to choose language

Posted: Sun Oct 29, 2017 11:23 am
by Jachym
The reason I put the enable/disable languages in the Main settings was in case someone for some reason did not want anyone to use any other language. But in that case using this block doesnt make sense either.