Issue: getLocale fails to detect locale for Hugo page bundles nested deeper than one level #777

Closed
opened 2026-10-05 03:04:56 +02:00 by adam · 6 comments
Owner

Describe the bug
When using Hugo with a multilingual setup and content organized by year/month (e.g. content/de/posts/2024/07/my-post/index.md), the panel shows the error "Could not retrieve the locale for the current file" and multilingual features are broken.

Expected behavior
getLocale should correctly detect the locale regardless of how deeply the page bundle is nested within the locale folder and should write the translated index.md with the same folder structure e. g. content/en/posts/2024/07/my-post/index.md

Environment:

VS Code: 1.106+
Front Matter CMS: latest
SSG: Hugo (Blowfish theme)

**Describe the bug** When using Hugo with a multilingual setup and content organized by year/month (e.g. content/de/posts/2024/07/my-post/index.md), the panel shows the error "Could not retrieve the locale for the current file" and multilingual features are broken. **Expected behavior** getLocale should correctly detect the locale regardless of how deeply the page bundle is nested within the locale folder and should write the translated index.md with the same folder structure e. g. content/**en**/posts/2024/07/my-post/index.md **Environment:** VS Code: 1.106+ Front Matter CMS: latest SSG: Hugo (Blowfish theme) <!-- github-sync-id:5011621345 -->
adam closed this issue 2026-10-05 03:04:56 +02:00
Author
Owner

The fix has been implemented, and you can give it a try by installing the beta version of the extension: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta (note: disable the stable version, as only one can be active).

Version: 10.11.305408000

The fix has been implemented, and you can give it a try by installing the beta version of the extension: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta (note: disable the stable version, as only one can be active). Version: `10.11.305408000` <!-- github-comment-id:5130562269 -->
Author
Owner

The fix has been implemented, and you can give it a try by installing the beta version of the extension: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta (note: disable the stable version, as only one can be active).

Version: 10.11.305408000

It works like a charm. Thank you so much! I’ll make a donation as soon as GitHub’s payment processing is up and running again.

Currently, frontmatter fields aren’t being translated. I would appreciate it if we could configure which frontmatter fields - such as 'slug' 'summary', 'ogTitle', 'metaTitle' etc. - should be translated.
For example, in Hugo, I have a 'review' archetype with 'pros', 'cons', 'verdict' etc., as frontmatter.

> The fix has been implemented, and you can give it a try by installing the beta version of the extension: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta (note: disable the stable version, as only one can be active). > > Version: `10.11.305408000` It works like a charm. Thank you so much! I’ll make a donation as soon as GitHub’s payment processing is up and running again. Currently, frontmatter fields aren’t being translated. I would appreciate it if we could configure which frontmatter fields - such as 'slug' 'summary', 'ogTitle', 'metaTitle' etc. - should be translated. For example, in Hugo, I have a 'review' archetype with 'pros', 'cons', 'verdict' etc., as frontmatter. <!-- github-comment-id:5140653011 -->
Author
Owner

Thanks @nachbelichtet, I've created a new issue for the remark you made.

Thanks @nachbelichtet, I've created a new issue for the remark you made. <!-- github-comment-id:5141656134 -->
Author
Owner

Thanks @nachbelichtet, I've created a new issue for the remark you made.

Great! Donated via opencollective.com now.

> Thanks [@nachbelichtet](https://github.com/nachbelichtet), I've created a new issue for the remark you made. Great! Donated via opencollective.com now. <!-- github-comment-id:5141695873 -->
Author
Owner

Thanks @nachbelichtet 🙏

Thanks @nachbelichtet 🙏 <!-- github-comment-id:5141817139 -->
Author
Owner

Released in version 10.12.0.

Released in version 10.12.0. <!-- github-comment-id:5371146729 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#777