Multilingual force language paths for all languages?

I am wanting all language content to use the language prefixes paths, such that:

http ://mysite.com/en/my-page
http ://mysite.com/fr/ma-page

The documentation indicates the default language will simple take form of:

http ://mysite.com/my-page

Is there any way to enforce the format I am needing?

My toml files look something as follows:

baseURL = "http://example.org"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "dummy-theme"
disableKinds = ["taxonomy", "taxonomyTerm"]

[languages]
  [languages.en]
    title = "My Hugo Site"
    weight = 1
  [languages.fr]
    title = "Mon site Hugo"
    weight = 1

Note: URLs mangled to be able to post.

add this to your config.toml:

defaultContentLanguageInSubdir = true

Check configuration documentation:

1 Like

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