Skip to content

Add languagePrefix to language config #9404

@misitebao

Description

@misitebao

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.92.0-B3549403+extended windows/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes!

When I set 'languageCode' with uppercase letters in the configuration file, the generated language folder name is still lowercase.

Language config:

disablePathToLower = true
[en]
contentDir = 'content/en'
languageName = 'English'
languageCode = 'en'
weight = 10
title = "My New Hugo Site"

[zh-Hans]
contentDir = 'content/zh-Hans'
languageName = '简体中文'
languageCode = 'zh-Hans'
weight = 20
title = "我的新Hugo站点"

Generated directory:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions