How to make multilingual index.html

For special styles of homepage, I add “intro” into index.html to display some text information.

{{- partial “intro.html” . -}}

I know how to set the nav and article content with multilingual mode, but how to make the “intro” section English version when clicking the En?

I am not sure if partials are “translatable”. I would attempt to do what you want with a “headless page bundle”. That’s a page that is not rendered by Hugo, but you can read it into a variable and display then.

The following code is doing something comparable on my site (It’s not translated, but you should be able to translate it the same way you would translate other content):

<footer id="authorinfo">
  <div class="container">
    <div class="row">
      <div class="col-12">
        {{ with .Site.GetPage "page" "sitewide/" }}
          <div id="authorfooter">
            <h3>{{ .Title }}</h3>
            {{ .Content }}
        {{ end }}       

and the markdown file

title: "Der Autor"
headless: true

The text you want to add

A good solution. Thanks for your reply.
However, I break the link between the article title and the article catalog. It means that not only “intro” section, but also the article catalog cannot translate automatically. I guess maybe there are some js codes in index.html, different languages introduce different html. For example, in English, introducing intro.en.html, and in Chinese, introducing intro.zh.html, but I don’t know how to tag the language button in nav and how to write the js codes. (Actually, I’m a designer. :blush: