diff --git a/content/en/functions/hugo/IsMultihost.md b/content/en/functions/hugo/IsMultihost.md index e4d4c176b..a71efaa18 100644 --- a/content/en/functions/hugo/IsMultihost.md +++ b/content/en/functions/hugo/IsMultihost.md @@ -5,7 +5,8 @@ categories: [] keywords: [] action: aliases: [] - related: [] + related: + - /functions/hugo/IsMultilingual returnType: bool signatures: [hugo.IsMultihost] --- diff --git a/content/en/functions/hugo/IsMultilingual.md b/content/en/functions/hugo/IsMultilingual.md new file mode 100644 index 000000000..e436ab160 --- /dev/null +++ b/content/en/functions/hugo/IsMultilingual.md @@ -0,0 +1,37 @@ +--- +title: hugo.IsMultilingual +description: Reports whether there are two or more configured languages. +categories: [] +keywords: [] +action: + related: + - /functions/hugo/IsMultihost + returnType: bool + signatures: [hugo.IsMultilingual] +--- + +{{< new-in v0.124.0 >}} + +Site configuration: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'de' +defaultContentLanguageInSubdir = true +[languages] + [languages.de] + languageCode = 'de-DE' + languageName = 'Deutsch' + title = 'Projekt Dokumentation' + weight = 1 + [languages.en] + languageCode = 'en-US' + languageName = 'English' + title = 'Project Documentation' + weight = 2 +{{< /code-toggle >}} + +Template: + +```go-html-template +{{ hugo.IsMultilingual }} → true +``` diff --git a/content/en/methods/site/IsMultiLingual.md b/content/en/methods/site/IsMultiLingual.md index 61cc5e462..a14283787 100644 --- a/content/en/methods/site/IsMultiLingual.md +++ b/content/en/methods/site/IsMultiLingual.md @@ -1,6 +1,6 @@ --- title: IsMultiLingual -description: Reports whether the site is multilingual. +description: Reports whether there are two or more configured languages. categories: [] keywords: [] action: @@ -9,6 +9,12 @@ action: signatures: [SITE.IsMultiLingual] --- +{{% deprecated-in 0.124.0 %}} +Use [`hugo.IsMultilingual`] instead. + +[`hugo.IsMultilingual`]: /functions/hugo/ismultilingual/ +{{% /deprecated-in %}} + Site configuration: {{< code-toggle file=hugo >}}