mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Update MultiLingual and MultiHost methods/functions
This commit is contained in:
@@ -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
|
||||
```
|
||||
@@ -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 >}}
|
||||
|
||||
Reference in New Issue
Block a user