# Error: failed to load translations

**URL:** <https://discourse.gohugo.io/t/error-failed-to-load-translations/48235>\
**Category:** support\
**Tags:** i18n\
**Created:** [February 12, 2024, 12:06pm UTC](https://discourse.gohugo.io/t/error-failed-to-load-translations/48235 "2024-02-12T12:06:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hucste](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hucste/32/10014_2.png) [@hucste](https://discourse.gohugo.io/u/hucste)\
**Post date:** [February 12, 2024, 12:06pm UTC](https://discourse.gohugo.io/t/error-failed-to-load-translations/48235/1 "2024-02-12T12:06:26Z")

</div>

Hi.

⇒ My [git](https://git.huc.fr.eu.org/SH-Hugo/doc.huc.fr.eu.org/)

⇒ My hugo version:

```auto
$ hugo version
hugo v0.122.0+extended linux/amd64 BuildDate=2024-02-04T14:35:47Z VendorInfo=debian:0.122.0-1

```

* * *

Recently, I converted all files .toml to .yaml, to use [/config/](https://git.huc.fr.eu.org/SH-Hugo/doc.huc.fr.eu.org/src/branch/master/config/_default) directory, to simplify my process to translate menu, and i18n translations.

I’ve problem with my i18n/files translations, on [i18n](https://git.huc.fr.eu.org/SH-Hugo/doc.huc.fr.eu.org/src/branch/master/i18n) folder;

- If I use on my **[i18n/en.yaml](https://git.huc.fr.eu.org/SH-Hugo/doc.huc.fr.eu.org/src/branch/master/i18n/en.yaml)**:

```auto
- id: alert-danger
  translation: Danger

```

`hugo server` fails to start with this error message:  
`Error: "~/doc.huc/i18n/en.yaml:1:1": failed to load translations: unsupported file format bool`

- If I use:

```auto
alert-danger:
  other: Danger

```

`hugo server` fails to start again, with this other error message:  
`Error: "~/doc.huc/i18n/en.yaml:1:1": failed to load translations: yaml: line 2: did not find expected key` or complain about `true` value (`expected key to be string but got true`)

* * *

Everything was working properly correctly, before converting my i18n .toml to i18n .yaml.  
Egual, no problem with all config files .yaml

Any idea/suggestion?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 12, 2024, 2:38pm UTC](https://discourse.gohugo.io/t/error-failed-to-load-translations/48235/3 "2024-02-12T14:38:46Z")

</div>

For the record, I hate YAML.

The problem child is this:

```auto
- id: on
  translation: " on "

```

Change it to this:

```auto
- id: "on"
  translation: " on "

```

We’re still interpreting YAML per v1.1 of the YAML spec, where an unquoted `on` is a boolean true, as is the word `yes`. The unquoted words `off` and `no` are also booleans.

---

<div class="post-metadata">

**Author:** ![hucste](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hucste/32/10014_2.png) [@hucste](https://discourse.gohugo.io/u/hucste)\
**Post date:** [February 12, 2024, 3:11pm UTC](https://discourse.gohugo.io/t/error-failed-to-load-translations/48235/4 "2024-02-12T15:11:26Z")

</div>

Really? Just for that! Huhhhh…

@jmooring: Thanks

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [February 14, 2024, 3:11pm UTC](https://discourse.gohugo.io/t/error-failed-to-load-translations/48235/5 "2024-02-14T15:11:42Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
