Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MultiLingual and MultiHost methods/functions #2484

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/en/functions/hugo/IsMultihost.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ categories: []
keywords: []
action:
aliases: []
related: []
related:
- /functions/hugo/IsMultilingual
returnType: bool
signatures: [hugo.IsMultihost]
---
Expand Down
37 changes: 37 additions & 0 deletions content/en/functions/hugo/IsMultilingual.md
Original file line number Diff line number Diff line change
@@ -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
```
8 changes: 7 additions & 1 deletion content/en/methods/site/IsMultiLingual.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 >}}
Expand Down