External links in multilingual site

Hello! I am setting up a multilingual site.

Here is a section of my hugo.yaml file.

defaultContentLanguage: en
languages:
  en:
    languageName: English
    weight: 1
  es:
    languageName: Español
    weight: 2

I have no problem creating md files for each lenguage. But in the main hugo.yaml file I have defined menu items for the top bar of the site. In that section I have links to my socials. The thing is, I have two YouTube channels, one in English and one in Spanish. Is there a way to correctly add a link for each lenguage?

Current hugo.yaml file:

menu:
  main:
(...)
    - name: YouTube
      weight: 5
      url: "https://www.youtube.com/c/channel_english"
      params:
        icon: youtube

Could I add something like this in some way?

url: "https://www.youtube.com/c/channel_english"
url_es: "https://www.youtube.com/c/channel_spanish"

Thanks in advance. I’m sorry if this is a dumb question but I am a data engineer and creating websites is not my strength.

TLDR: Multilingual site, I want YouTube logo to redirect the user to the channel in his language.

image

Define the menus separately for each language.

https://gohugo.io/content-management/multilingual/#create-language-specific-menu-entries

1 Like

Sorry I became the kind of user I hate. Thanks For the help!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.