# Flag Icons in navbar (All browser)

**URL:** <https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575>\
**Category:** support\
**Tags:** configuration\
**Created:** [September 23, 2026, 1:27pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575 "2026-09-23T13:27:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![malde11](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@malde11](https://discourse.gohugo.io/u/malde11)\
**Post date:** [September 23, 2026, 1:27pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/1 "2026-09-23T13:27:17Z")

</div>

Hi,

I am looking for flags in my navigation to switch between english and german. The switch is working, but my flags are shown only on Windows 11 in firefox(156) and on mobile browser(Android 16/firefox and chrome). On Edge and Chrome on Windows 11 they do not work.

I have seen this [Emojis](https://gohugo.io/quick-reference/emojis/#flags)

But do not know, if this works on all browser.

At the end, if nothing else works I will insert an image/svg for the flags. In another post I have seen this: [How can I replace languages by flag images?](https://discourse.gohugo.io/t/how-can-i-replace-languages-by-flag-images/17491)

This it is at the moment on firefox and how it should look like:

![Screenshot 2026-09-23 154721](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/optimized/3X/3/9/3955379cc5e7eecd586d9cfa671f54dab080df8b_2_690x46.png)

And this it looks like on chrome:

![Screenshot 2026-09-23 154751](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/optimized/3X/6/2/628791286a1460502b6aa3b95b598dc36341e479_2_690x45.png)

This is my hugo.toml:

`[languages]`  
`[languages.de]`  
`locale = 'de-DE'`  
`label = 'Deutsch🇩🇪'`  
`contentDir = 'content/de'`  
`flag = '/images/svgs/flag-german.svg' // I'll insert this if nothing else will work`  
`weight = 1`

And a snippet of my navbar:

```auto
{ range .AllTranslations }}
<li class="nav-item language-pipe">|</li>
<li class="nav-item">
    <a class="nav-link" href="{{ .Permalink }}">
        <img class="menu-item" alt="Language items" src="/images/svgs/menu-arrow.svg">
        {{ .Language.Label }}
    </a>
</li>
{{ end }}

```

What is the best solution for my problem?

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [September 23, 2026, 2:57pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/3 "2026-09-23T14:57:20Z")

</div>

So looks like the emoji translates to unicode symbols

> [@malde11](#):
>
> label = ‘Deutsch​🇩🇪’

`&#x1f1e9;&#x1f1ea;` which renders as **🇩🇪** It’s a special styled ‘D’ followed by an ‘E’.

no image inside as far as I can see

if you check the [Full Emoji List, v18.0](https://unicode.org/emoji/charts/full-emoji-list.html) the images displayed there are real images with an ALT text and the first column is also rendered as DE …

```auto
<td class='andr alt'><img alt='&#x1F1E9;&#x1F1EA;' class='imgs' src='data:image/png;base64,R0lGODlhDwAPALMPAP7XAF0HAdejADY2NpwEA/hhAAMDA8oKCf0AAKZpADwwABUVFWBPACUVDBELAgAAACH5BAEAAA8ALAAAAAAPAA8AAARh0KxJzbv4rcG7kRa2dZzhDEuokajZgsEhz0HTbkuA7DxBHAQHTsfb/XY1lKLAbCYICOAvwABYr4LmkXrFCqyJA4LbBQi+Z2bAoWi7GwnrGcDIZBwMRpxu7zu+dX12CgwNEQA7'></td>

```

and if you ask some AI-search engines:

> you need a Font that renders these sequences as Flags IF the platform (browser) does not support that by itself 😉

might also help to _not_ set a font for the sequence

PS. if you wonder why that is displayed viewing the Forum in chrome check the source code (ctrl+u) of this page, you will see a link to an image

`https://emoji.discourse-cdn.com/twitter/germany.png?v=15`  
[![](https://emoji.discourse-cdn.com/twitter/germany.png?v=15) ](https://emoji.discourse-cdn.com/twitter/germany.png?v=15)

* * *

ignoring the “flag = country \<\> language” discussions from the past

---

<div class="post-metadata">

**Author:** ![malde11](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@malde11](https://discourse.gohugo.io/u/malde11)\
**Post date:** [September 23, 2026, 3:57pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/4 "2026-09-23T15:57:39Z")

</div>

OK, I am bit confused now 🙂

What shall I do or what is the best solution?

I have tried changing the fonts, but that did not work. Shall I use an emoji font or images now?

I have asked the AI-search and got this result:

 ![Screenshot 2026-09-23 175250](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/3/3/331fe42e8cd37ef7c47987f7245956e4bf9b4688.png)

Looks like I need two.. one for Android/Chrome and one for Windows. But I do not know about the license for the Windows font. How about the size of the fonts and are two small images smaller or bigger than the fonts?

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [September 23, 2026, 4:11pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/5 "2026-09-23T16:11:57Z")

</div>

I’m out here, sry

If it were mine, i would get in a deeper discussion with the AI. should also be able to answer the license questions.

maybe it can tell about a best practice or even provide a working setup.

for manual testing I would set up a minimal test page without noise and check the results incl. the real source (ctrl+u) and in dev console on the systems - check the used fonts…

---

<div class="post-metadata">

**Author:** ![malde11](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@malde11](https://discourse.gohugo.io/u/malde11)\
**Post date:** [September 23, 2026, 5:19pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/6 "2026-09-23T17:19:15Z")

</div>

Thanks for your time.. I have got it working now. I am using the emoji font:

> **[Noto Color Emoji - Google Fonts](https://fonts.google.com/noto/specimen/Noto+Color+Emoji/glyphs)**
>
> Noto Color Emoji is an open source font that has you covered for all your emoji needs, including support for the latest Unicode emoji specification. It features

It is working on Edge and Chrome now. But how you can see on the screenshot the navbar has got two different fonts:

![Screenshot 2026-09-23 190547](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/optimized/3X/7/4/748f1341b47e5c47d716509e2b56b6d54e9955d3_2_690x44.png)

Thats my navbar code:

```auto
{{ range .AllTranslations }}
<li class="nav-item language-pipe">|</li>
<li class="nav-item">
    <a class="nav-link" href="{{ .Permalink }}">
        <img class="menu-item" alt="Language items" src="/images/svgs/menu-arrow.svg">
        <span class="language-label">{{ .Language.Label }}</span>
    </a>
</li>
{{ end }}

```

My CSS:

```css
@font-face {
  font-family: "Noto Color Emoji";
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/NotoColorEmoji-Regular.ttf");
}

.language-label {
    font-family: "Noto Color Emoji" !important;
}

```

and my hugo.toml:

`[languages]`  
`[``languages.de``]`  
`locale = 'de-DE'`  
`label = 'Deutsch 🇩🇪'`  
`contentDir = 'content/de'`

I need to split it somehow into two peaces. One font for the links and one font for the flags.

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [September 23, 2026, 5:47pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/7 "2026-09-23T17:47:48Z")

</div>

move the flag part to a param

```toml
[languages.de.params]
      flag = '&#x1f1e9;&#x1f1ea;'

```

---

<div class="post-metadata">

**Author:** ![malde11](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@malde11](https://discourse.gohugo.io/u/malde11)\
**Post date:** [September 23, 2026, 6:03pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/8 "2026-09-23T18:03:41Z")

</div>

Got it like this now:

`[languages]`  
`[languages.de]`  
`locale = 'de-DE'`  
`label = 'Deutsch'`  
`contentDir = 'content/de'`  
`[languages.de.params]`  
`flag = '🇩🇪'`

and my navbar:

```auto
{{ range .AllTranslations }}
<li class="nav-item language-pipe">|</li>
<li class="nav-item">
    <a class="nav-link" href="{{ .Permalink }}">
        <img class="menu-item" alt="Language items" src="/images/svgs/menu-arrow.svg">
        {{ .Language.Label }}
            <span class="language-flag">{{ .Language.Params.Flag }}</span>
    </a>
</li>
{{ end }}

```

Thanks for your help!! 😃

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [September 23, 2026, 6:08pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/9 "2026-09-23T18:08:35Z")

</div>

> [@malde11](#):
>
> `class="language-label"`

i would rename that class maybe language-flag as you dont style the label anymore

---

<div class="post-metadata">

**Author:** ![malde11](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@malde11](https://discourse.gohugo.io/u/malde11)\
**Post date:** [September 23, 2026, 6:22pm UTC](https://discourse.gohugo.io/t/flag-icons-in-navbar-all-browser/57575/10 "2026-09-23T18:22:08Z")

</div>

good point.. i have done it.
