Language Selector Flag Icons at the top of the page.

Alpha1

Well-known member
Currently if a user wants to select a language they have to go to the left bottom, find the language selector there to change language.
its pretty standard behaviour around the internet to have a flags drop down at the right top of the page. Thats where users look for it.

I suggest the same approach as Burning Board, Magento, and many sites around the internet:

Screenshot-2018-3-28 Forum - WoltLab®(1).webp

I'd like to have the option to display a flag icon drop down in the navigation menu. Please add this to the menu manager.
 
Upvote 24
To elaborate: this would include having flag icons available within XF, so that when you add a language pack it would be easy to automatically or manually tie those flags to a language pack, so that the language selector works.
 
To elaborate: this would include having flag icons available within XF, so that when you add a language pack it would be easy to automatically or manually tie those flags to a language pack, so that the language selector works.
That's pretty much the definition of a style: it may add resources. And binding the flags to the selector can be done with simple CSS, so once again you could customize it anytime yourself.
 
The solution to this may seem simple enough to you as a coder, but that seems to assume that any admin can do this. Which is incorrect. In fact the multilingual site admins I know struggle with things like this heavily. Its not without reason that XF2 added a menu manager while theoretically admins can code drop down links. For example: it took me a day to create a CSS button from example and I would probably not have succeeded if @Bob would not have given me a better example to work from. What may seem really simple to you is close to impossible to someone else.

This is why I request this to be added to the core. IMHO XenForo is not friendly or really usable for multi-lingual sites at all. This small function is one of many functions I have requested to make XF functional for multi-lingual sites.
Are you assuming that there is a one-to-one relationship between languages and country flags?
There is a one to one relationship between iso language codes and flags. But its the end result that counts. Some form or manner in which we can have language flags tied to a language selection.
 
There is a one to one relationship between iso language codes and flags. But its the end result that counts. Some form or manner in which we can have language flags tied to a language selection.
Which the user you quoted just told you is not a good idea.

You may think that this only applies to countries that are in conflict, where users have more important things to do than spend time on forums. To that I ask you; If I select "Norway" from the drop-down, how do you propose that lets the forum know whether I want "Norwegian (Bokmål)" or "Norwegian (Nynorsk)"? :)

Two country selects? Sub-options? You've created a messy and unwieldy menu that forces users to abandon everything they know about language selections.

What if I am Belgian, I then have to select "The Netherlands" as my country because I want the site in Dutch, instead of just being able to pick "Dutch" from a menu.

I have never come across a single site on the entire Internet where language selection is tied to the name of a country. To me, it's a nonsensical concept that is best suited to an add-on since it applies to very few sites other than yours.


Fillip
 
Very coincidentally, before this thread was opened, 1 day before, I asked a developer to create some addons regarding languages. This specific suggestion is one of them. He told me that in a week or so he is gonna publish the addon.

Anyway, the suggestion having flags is a good suggestion. And all countries in the world have official languages.
If one does have multiple official languages or you have 2 Norwegian dialects, well put 2 Norwegian flags, 1 for Nynorsk and 1 for Bokmal. Done. Of course if the board has these languages installed.

I don't understand the problem here about the flags. That is the most common feature on all software products. There is a dropdown for languages and you choose one from it and most of them do have flags, in case one would not know what that word means, so having the flag makes it easier to identify the language which is offered. And the "normal" place for choosing languages are always on top in the corner.
 
Last edited:
@DragonByte Tech
Yes, anything you have just written would be ridiculous. I would never suggest any of that.
Its a commonly used practise to tie flags to languages. While this indeed is not always exact, its universally used for language selectors. Its fine for the German Language to have an German flag icon, even if the user is not a German. They will understand and quickly see the language they need. IPS & Burning Board use country flags for their translations. Magento and any other e-commerce platform I know have a flag language selector.

As you know icons are not always 100% exact and do not have to be. Just take a look at the editor icon or pretty much any icon on narrow view. The user will need to interpret what each icon means. For flag icons this is much easier than some of the other icons used. Even if the icon does not match the flag of the country the user is in.
 
"Yes, I've heard of Americans that refused to select the English Language because the flag icon shown was the Union Jack. Same with Australians and New Zealanders..."

...said no one ever...

@Alfa1 has a valid suggestion, uses common sense and refers to a very common internet practice. No need to turn this into a "problem".
 
The solution to this may seem simple enough to you as a coder, but that seems to assume that any admin can do this. Which is incorrect. In fact the multilingual site admins I know struggle with things like this heavily. Its not without reason that XF2 added a menu manager while theoretically admins can code drop down links. For example: it took me a day to create a CSS button from example and I would probably not have succeeded if @Bob would not have given me a better example to work from. What may seem really simple to you is close to impossible to someone else.

Hands down, if admins do not even try to understand or play around with XFs TMS, then this is their fault and not XFs. You don't have to be a coder either to modify a style. It's pretty basic CSS. I mean after all you're running a community, you should know, what your system is based on.
Besides that, there are plenty of helpers on this forum who might help you out with simple modifications like this.

That being said, I'm not at any means a styling expert myself. If you still want a plain and simple, but maybe not the most clean solution, here you go:
1) upload your country flags somewhere under your root, for example /images/flags/
2) go to extra.less and add this for every language you have in your selector, you will need to find out the names yourself though:
CSS:
a[href*="language_id=1"]::before {
    content: url('path/to/flag/1')
}
a[href*="language_id=2"]::before {
    content: url('path/to/flag/2')
}
Result:
ilhl2w5u.png

That's it. Literally everything you have to do. And to get that in the top nav bar, well, you just have to move the code within PAGE_CONTAINER template from footer to top nav..
Please tell me where the difficulty for any admin could be if they at least tried to understand how styling and template modification works. I'm pretty sure this would be a good point for improvement for XF if there are any difficulties to pull off basic modifications like this.
This small function is one of many functions I have requested to make XF functional for multi-lingual sites.
I've looked through your list and what can I say, a lot of your suggestions can be done with template modifications and/or styling plus using the correct options. Though, I'll admit, those modifications are not easy to pull off, it's doable and it would be probably a good thing to implement some of that stuff into core. But let's be honest here, most forums are monolingual with maybe a special section for other languages, thus custom development is probably the way to go.
 
@Alfa1 suggested a very simple, clear idea.
I'd like to have the option to display a flag icon drop down in the navigation menu. Please add this to the menu manager.
He just made it clear by providing an example (Flag in language selector -> So, was the flag his concern really? after 20 years of having communities, he really doesn't know he can do it with half a line of CSS? or his suggestion is something else and is coming from somewhere that maybe others don't know at first sight?)

Just a note: I'm not his friend, nor I've ever seen him. I just know him in forum communities for years. @Alfa1 is not a beginner, nor a poor homeless guy. He has communities with millions of users for a long time (maybe more than the age of some developers here that feel they have enough experience!). So, when he suggests something, it doesn't mean that he doesn't know what "TM" is or he wants to have it in the core in order not to pay for custom work. (maybe lots of add-ons that you see are initially invested by him and then you see them or their great features that came with updates. I'm wondering why in most of the times when he talks, some people change the simple clear thread to a very complex unsolvable-political-literature-linguistic-historical threat in the world)
 
Uh, I never meant to be offensive or something like that. Apologies if that was unclear.
I'm wondering why in most of the times when he talks, some people change the simple clear thread to a very complex unsolvable-political-literature-linguistic-historical threat in the world
Just to clarify this aswell, this is nothing personal, I have nothing against @Alfa1 and I appreciate the work he has done for the community a lot!
But: if he keeps waiting for his suggestions to be added to the core (which address back to 2015 or something, that's 2-3 years at least!), well then good luck.
If anyone wants to change basic stuff, go ahead and change it yourself. Share it with the community (I don't care if paid or not), so everyone can benefit from it, or, if you are not able to that yourself, ask the community. That is the whole point. Nothing will change if you just keep bumping very specific threads for years. You will have to do something yourself.
 
The reason why I want this in core is not because there is no other way to get it. Asides from the functions usefulness; once we have this simple function in core it opens the door to many other language functions. Such language flag selector function could be extended to other functions. Mind that I specifically suggest a drop down selection, not an overlay.
But: if he keeps waiting for his suggestions to be added to the core (which address back to 2015 or something, that's 2-3 years at least!), well then good luck.
I see it differently. Quite a lot of my suggestions have ended up in XenForo 1 & 2. I post suggestions here for this reason.
I use 95 addons and many modifications. Many of which are for basic stuff and many addons I used in the past turned out buggy and conflicting. I hope to see XF grow to a point where its no longer needed to install 50 addons for base level stuff that many need. A language flag IMHO is base level stuf.

In regards to flags themselves: There are some great CSS flags available, or SVG or sprite. The use of old fashioned image icons is deprecated IMHO.

I think the demand for multilingual functions is underestimated. Currently if you run a multilingual site, then most likely only the main language part of the site will survive. If you happen to run a successful forum in your niche then it makes sense to expand into different languages as well. But its not possible. Google will not even index a section in a different language because you can only set one main language. The interface is not there. Language packs do not always make much sense to the reader. Therefore it will likely fail. Many will not even start with it. Its easier to just go to Reddit.

Conversely, Reddit thrives from this weakness of forum software and its an important factor in Reddit's growth. Members have begged me for a Spanish or French section. Due to the lack of functions I had to decline. Guess where they ended up. Yup Reddit.

The approach that I see admins take is to have multiple installations of XF. But that is hard to manage and track.

I concur that multilingual functions are not for everyone, but I do believe multi-language functions are appealing. Thats the point of the voting system for suggestions. If no one votes for it then most likely it will not be implemented. If there is demand then this will become obvious through votes. I have stopped posting just any suggestion that I think is useful like I did in previous years. There is just too much pushback. All suggestions I post now are because I think its significant. Votes will make this clear.

For me, the lack of language functionality is one of the main pain points for XenForo, because of the devastating effect it has. I don't think I am the only one who considers it so important.
Hands down, if admins do not even try to understand or play around with XFs TMS, then this is their fault and not XFs.
I do not concur. I really do not think XenForo customers should be required to know CSS and Template Editing. Some do not even know how to use FTP. Personally I am a fairly proficient XF1 webmaster; TMS, phrases, stylevars, replicating and modifying code, and some CSS/style editing is clear cut to me. I am however not proficient in CSS at all.
 
You do not need something integrated into the core so others can extend that (heavily). Two excellent examples for that are https://xenforo.com/community/resources/bd-widget-framework.297/ and https://xenforo.com/community/resources/kl-notification-service-framework-nsf.5665/
And I'm not quite sure how a basic cosmetic change would open doors for other things, but I assume I have misunderstood something.

I do not know what kind of stuff you have installed, but if it's just simple template modifications and stuff like that, well yeah. We did have around 20 add-ons in XF1, we've reduced that to 8 in XF2, throwing out every small add-on - everything else is handled by templates, style and custom development. Yes, this does mean you have to invest in work, and some may be redundant, but that's ok. You get results immediately. And, this is the most important part, you can handle conflicting modifications yourself.

Reddit is no comparison to forums. They don't go to reddit, they will look for a (or more) sub-reddit(s), which is pretty similiar to a complete XF installation. Reddit is a portal, XF is a board.

XF customers and admins are two different topics. You can be the license holder (customer), but you don't have to be the admin. And then again, not every admin is a technical admin. So my point above applies to everyone who is in charge for the technical stuff.

To concluse this topic from my side: there is nothing wrong with making suggestions, even small suggestions. And it's really cool if it makes its way into core. And I got your point that you don't necessarily want it only for yourself, but for everyone. Nothing wrong with that at all. I personally look down on that problem in another light: it's way more beneficial for everyone if anyone creates some valuable stuff themselves and presents that to the community (again, paid or not, does not matter). You can save yourself and others the time and create a better experience overall as long as it is not part of the core.

P.S.: Regarding your remarks to my solution above - yes, I know you want a dropdown. But I couldn't find the "menu manager" you mentioned above. If you could hint me to where that is, no problem, would look into that. Ultimately, it's up to you to markup a simple list (it's nothing more than that) and add the flags to that.
 
I am not against the suggestion of language selector placement, perhaps with an option to choose from the header and footer (or whatever makes sense). However, an association of a language to a country flag would be problematic in the broader context, thought it might work for a subset of languages that a specific site supports.

Languages and countries do not have a one-to-one or one-to-many relationship, instead they have a many-to-many relationship. India alone has over 22 officially recognized languages of which 15 are found in Indian currency notes. On the other hand, numerous Middle East countries have Arabic as their official language.

Urdu (language code "ur") is the official language of Pakistan, but it is also one of the recognized languages in India with a significant number of native speakers. The two countries do not have a friendly relationship for a long time, so associating Urdu language with one country's flag would offend the visitors from the other country. A forum admin can have country variant "ur-PK" and "ur-IN", but this means duplicating translations and updating both when any phrase is changed. This could be something that can be dealt as case-by-case, but not very practical as a global core feature.

That said, there is a more elegant way of solving this issue. Each language can have an optional "icon" field that can be set by the admin using an appropriate flag or any custom icon that symbolically represents that language.
 
Last edited:
It defies a multilingual board's logic to look for a language on the bottom - and without flags (in those rare cases, someone finds the chooser by mistake, it must be clicked again just to get a modal pop-up :unsure:).

It's the single strangest thing for me since the beginning for an otherwise very well-thought UX.
(I couldn't understand this in the vBulletin era and x years later... at least as an option Dear @Kier )

Not in the core, no extension for it.

Woltlab is running multilingual boards from the start.
Do we have to wait until Xenforo does the same for this tiny hack?
 
Top Bottom