The default language of my website is English. I have a folder content/foo and I want this folder to have another default language, say French. It’s a particular case of multi language where the website is multi language, but every page is actually available in one and only one language (but it might be a different one).
Is it possible? For example, is it possible to add in the front matter something like Language = "fr"? Or is there another option?
I know I can use the multi language feature by renaming my files such as content/foo/bar.fr.md. This would work but:
Edit: what is the “default language”? As in, what does that do, technically?
I’ve never used the multilingual feature in Hugo, but I imagine it works by setting templates for the different languages so they load the correct language code or soemthing, ne?
What I mean is, if you don’t need associated, overlapping pages, just write in the language you need for a given page. Any small adjustments you need to make you can do so in the appropriate template, for that section. That’s how I’d proceed.
What I meant, what does it mean to you? I know what it means for Hugo, but you aren’t looking for that particular solution. @okabrionz’s does what I was thinking of:
<html lang='{{ if eq .Params.Lang "" }}en{{else}}{{ .Params.Lang }}{{end}}'>
Sorry for being unclear. I want to use i18n implemented in Hugo, which, if I’m getting right, is base on a “current” language. So yes, I don’t really want to change the “default language” of a folder rather than the “current language”.
Thanks for the tips! I however need to use the i18n functionnality, but I don’t know on which parameters it’s based on (I tried to hard change <html lang="fr"> in the template but i18n doesn’t care )