Update MultiLingual and MultiHost methods/functions

This commit is contained in:
Joe Mooring
2024-03-16 09:37:46 -07:00
committed by GitHub
parent c6aeeb7474
commit 8e267d7804
3 changed files with 46 additions and 2 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ categories: []
keywords: []
action:
aliases: []
related: []
related:
- /functions/hugo/IsMultilingual
returnType: bool
signatures: [hugo.IsMultihost]
---
@@ -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
```
+7 -1
View File
@@ -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 >}}