# National flags indicating home country of each user?

**URL:** https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555
**Category:** Feature
**Created:** [30.Ноябрь.2016 06:11:04 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555 "2016-11-30T06:11:04Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Gunnar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gunnar/32/119647_2.png) [@Gunnar](https://meta.discourse.org/u/Gunnar)
#### Post date: [30.Ноябрь.2016 06:11:04 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/1 "2016-11-30T06:11:04Z")

</div>

One thing we had on our old (home made) forum was little flags showing where each user is from. We have members from all over the world, so that is now our #1 most requested feature on Discourse.

Would this be hard to implement? Best place for it would probably be the user card.

Thanks,  
Gunnar

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [30.Ноябрь.2016 06:21:50 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/2 "2016-11-30T06:21:50Z")

</div>

It would make a good plugin. Some things to think about, is this set from signup IP, or is it something users have to configure themselves?

---

<div class="post-metadata">

### Author: ![Gunnar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gunnar/32/119647_2.png) [@Gunnar](https://meta.discourse.org/u/Gunnar)
#### Post date: [30.Ноябрь.2016 07:09:12 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/3 "2016-11-30T07:09:12Z")

</div>

> [@codinghorror](#):
>
> or is it something users have to configure themselves?

I was thinking based on what the user enters about themselves in their personal information/profile. That way it’s voluntary.

Gunnar

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [30.Ноябрь.2016 07:51:25 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/4 "2016-11-30T07:51:25Z")

</div>

Hi Jeff,

I am working on the same site as Gunnar.

From a user viewpoint, the benefit would be that the user could quickly get an idea of location (and therefore timezone, language, and currency) with a single click on the user symbol. Our site pretty much spans the world, so this would save users asking.

Some of the other sites I use have user selectable flags, but on many of them the user can select any flag they wish. This may allow them to express some personal allegiance, but it kind of defeats the main benefit to be had from having this kind of information.

I would say detecting it from ip addy would be a bit too much overhead if you have to do a lookup at every user login (Which is pretty much what you would have to do to handle the case of a user who is travelling), so linking it to the user’s country as defined in their profile would be my choice.

Forgive my imprecise use of Discourse terminology, until a week ago I had never used Discourse. I’m not really _quite_ as obtuse as I initially appear to be. (In fact, it’s a lot worse once you get to know me.)

Andrew

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [30.Ноябрь.2016 08:11:41 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/5 "2016-11-30T08:11:41Z")

</div>

> [@JagWaugh](#):
>
> I would say detecting it from ip addy would be a bit too much overhead if you have to do a lookup at every user login

No, I meant once at first logon.

---

<div class="post-metadata">

### Author: ![ewanly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ewanly/32/62854_2.png) [@ewanly](https://meta.discourse.org/u/ewanly)
#### Post date: [30.Ноябрь.2016 08:52:19 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/6 "2016-11-30T08:52:19Z")

</div>

It would be better if user choose the proper flag. Not all people living in there countries and some may have more than one nationality. A nice feature to add 👍

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [30.Ноябрь.2016 09:06:14 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/7 "2016-11-30T09:06:14Z")

</div>

How about:

Assign it based on IP on first login.  
Make it configurable so that you can make it a mod\_only, or User editable.  
And since I’m in wish concert mode:  
If a user wants to change it, and you’ve allowed “Country\_Flag\_may\_mean\_nothing”, then pop up a (stern) warning to the user if the flag doesn’t match with the ip addy.

Andrew

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [30.Ноябрь.2016 15:01:49 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/8 "2016-11-30T15:01:49Z")

</div>

> [@Gunnar](#):
>
> Best place for it would probably be the user card

Agree.

Related wish some time ago:

> [@User location's flags](https://meta.discourse.org/t/user-locations-flags/39109):
>
> Hello, we need identify the countries where the members come from. Something visible without clicking on the profile or expanding the profile info, an example: [image] I searched the forum about this topic, and I found this: A question to staff, what’s the idea about that? Shows the “location’s text” as “text” or such as an image flag? Could you tell us more about that? Thanks!!! Ps, I didn’t know where I have to post this “idea” or request, so I wrote it in “uncategorized”.

---

<div class="post-metadata">

### Author: ![Gunnar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gunnar/32/119647_2.png) [@Gunnar](https://meta.discourse.org/u/Gunnar)
#### Post date: [01.Декабрь.2016 05:06:22 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/9 "2016-12-01T05:06:22Z")

</div>

> [@ewanly](#):
>
> It would be better if user choose the proper flag. Not all people living in there countries and some may have more than one nationality

Indeed. For us it’s not so much a question of identity or roots, as it is a question of **current** location for practical purposes.

For example, if a user posts “I get 20 mpg in my Jaguar XJ12”, and another user can’t get more 16 mpg in his identical car, it would help to know that the first poster is in the UK (1 gallon = 4.5 liters) and the second is in the US (1 gallon = 3.8 liters). 😉

I like the idea of initially populating it from the IP address though. At least we’ll have something to go on, until the user updates it.

Gunnar

---

<div class="post-metadata">

### Author: ![Ebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ebs/32/119612_2.png) [@Ebs](https://meta.discourse.org/u/Ebs)
#### Post date: [18.Январь.2017 01:25:11 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/10 "2017-01-18T01:25:11Z")

</div>

I had a go at this.

 ![](https://global.discourse-cdn.com/meta/original/3X/e/2/e25761a3415fee4376d64ff6a79282bea430f1ec.PNG)

I believe OP was talking about a plugin for phpBB. I used the same plugin on my forum before we changed over to Discourse a couple of weeks back. A few of the members mentioned they missed the flags, so last Friday I decided to jump in and have a go at a plugin for Discourse.

In its current state, it’s fairy ‘hacky’ and there’s _plenty_ of room for improvement. I’d appreciate some help with the code if anyone is willing to offer their assistance!

> **[GitHub - Ebsy/discourse-nationalflags: National Flags plugin for Discourse](https://github.com/Ebsy/discourse-nationalflags)**
>
> National Flags plugin for Discourse

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [18.Январь.2017 14:13:41 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/11 "2017-01-18T14:13:41Z")

</div>

I’m sorry that I am unable to contribute any code, but I wonder whether it would be too much trouble to extend the functionality to allow users to add multiple flags. I guess the reasons are obvious but let me just give an example: I am about to build a website for a global community of people who are themselves often highly mobile internationally so that it makes little sense to them to select a single national identity, such as “I am German” or “I am from Germany”. What makes sense in this context (and I think increasingly for many people) is to say “I’m of German descent, born in Indonesia and living in the UK”. Putting three flags would nicely sum that up…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [18.Январь.2017 14:28:59 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/12 "2017-01-18T14:28:59Z")

</div>

@Ebs, ты состоишь в группе `plugin_authors`, так что не стесняйся создать отдельную тему в категории #Customization > Plugin и приложи несколько скриншотов 😉

---

<div class="post-metadata">

### Author: ![Ebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ebs/32/119612_2.png) [@Ebs](https://meta.discourse.org/u/Ebs)
#### Post date: [18.Январь.2017 15:16:32 UTC](https://meta.discourse.org/t/national-flags-indicating-home-country-of-each-user/53555/13 "2017-01-18T15:16:32Z")

</div>

Спасибо, Сэм. Я сначала опубликовал ответ, а уже потом подал заявку на вступление в группу #Customization > Plugin, чтобы у меня было что показать.

Я только что опубликовал сообщение — [National Flags](https://meta.discourse.org/t/national-flags-display-user-nationality-in-discourse/55969)
