Skip to content

Commit

Permalink
Add private use subtag requirements to multilingual page
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Aug 31, 2024
1 parent a5c6bb4 commit a49697e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions content/en/content-management/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ This is the default language configuration:

In the above, `en` is the language key.

{{% note %}}
Each language key must conform to the syntax described in [RFC 5646]. You must use hyphens to separate subtags. For example:

Language keys must conform to the syntax described in [RFC 5646]. For example:

- `en`
- `en-GB`
- `pt-BR`
- `en-US`

[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7] are also supported. Omit the `art-x-` prefix from the language key. For example:

- `hugolang`

{{% note %}}
Private use subtags must not exceed 8 alphanumeric characters.
{{% /note %}}

[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
[RFC 5646 § 2.2.7]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7

This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration.

{{< code-toggle file=hugo >}}
Expand Down

0 comments on commit a49697e

Please sign in to comment.