1.0 KiB
1.0 KiB
title, weight
| title | weight |
|---|---|
| Multi-Language | 4 |
Multi-Language Support
Hugo Book supports Hugo's multilingual mode with content translation by directory.
Configuration
Define languages in your site config
[languages]
[languages.en]
label = 'English'
contentDir = 'content.en'
weight = 1
[languages.zh]
label = 'Chinese'
contentDir = 'content.zh'
weight = 2
[languages.he]
label = 'Hebrew'
contentDir = 'content.he'
direction = 'rtl'
weight = 3
A language selector dropdown appears automatically when multiple languages are configured.
RTL Support
Set direction = 'rtl' on a language to enable right-to-left layout. The entire page layout, including the sidebar menu, mirrors automatically.
Translation Dropdown
By default, all configured languages appear in the selector. To only show languages that have a translation for the current page
[params]
BookTranslatedOnly = true