I have been using the theme at GitHub - razonyang/hugo-theme-bootstrap: An extreme fast, responsive and feature-rich Hugo theme. 一个极快、响应式和功能丰富的 Hugo 主题。 on a test website and starting to add content. It is a multilingual theme, yet I only want English on the site.
Part of the top navbar has the language selection. It would obviously be less work to simply remove that feature. There are plenty of docs on how to make a theme multilingual, but not much on how to use a multilingual theme for a single language.
Part of the config.toml
# Multilingual mode
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
This is the code in the file translations.html
{{ if and .IsTranslated }}
<div class="post-translations nav-item dropdown me-2 d-inline-flex">
<a class="nav-link p-0" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-fw fa-language me-1"></i>{{ $.Language.LanguageName }}
</a>
<div class="dropdown-menu">
{{- range .Translations -}}
<a class="dropdown-item post-translation" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{- end -}}
</div>
</div>
{{ end }}
But I can’t see at present how to set “IsTranslated” on or off ?
Later … Just saw the following from Multilingual Mode | Hugo on how to disable a language
disableLanguages = ["fr", "ja"]