\ No newline at end of file
diff --git a/layouts/_partials/navbar.html b/layouts/_partials/navbar.html
index 3ac3a365d8..c409b189b0 100644
--- a/layouts/_partials/navbar.html
+++ b/layouts/_partials/navbar.html
@@ -53,12 +53,12 @@
{{ end -}}
{{ if (gt (len .Site.Home.Translations) 0) -}}
-
+
{{ partial "navbar-lang-selector.html" . -}}
{{ end -}}
{{ if .Site.Params.ui.showLightDarkModeMenu -}}
-
+
{{ partial "theme-toggler" . }}
{{ end -}}
diff --git a/layouts/_partials/sidebar-tree.html b/layouts/_partials/sidebar-tree.html
index 7d6f6c72c6..65049bebc1 100644
--- a/layouts/_partials/sidebar-tree.html
+++ b/layouts/_partials/sidebar-tree.html
@@ -34,7 +34,7 @@
{{- if .Site.Params.ui.sidebar_search_disable }} td-sidebar-nav--search-disabled{{ end -}}
{{- if .Site.Params.ui.sidebar_menu_foldable }} foldable-nav{{ end -}}
" id="td-section-nav">
- {{ if (gt (len .Site.Home.Translations) 0) -}}
+ {{ if and .Site.Params.ui.sidebar_lang_menu (gt (len .Site.Home.Translations) 0) -}}
+{{/* */ -}}
diff --git a/userguide/.htmltest.yml b/userguide/.htmltest.yml
index 84454d65f3..5439010316 100644
--- a/userguide/.htmltest.yml
+++ b/userguide/.htmltest.yml
@@ -8,10 +8,12 @@ TestFilesConcurrently: true
IgnoreDirs:
- _print
- ^blog/(\d+/)?page/\d+
+ - ^xx # Placeholder language
IgnoreEmptyHref: true # FIXME
IgnoreInternalEmptyHash: true # FIXME
IgnoreInternalURLs: # list of paths
IgnoreURLs: # list of regexs of paths or URLs to be ignored
+ - ^(https://www.docsy.dev/)?xx/ # Placeholder language
- \?no-link-check
- (index.xml|_print/)$ # ignore
- ^https?://[^/]+/(categories|tags)/ # ignore Docsy-generated content
diff --git a/userguide/content/en/docs/adding-content/navigation.md b/userguide/content/en/docs/adding-content/navigation.md
index cda7ea0f53..049059c8f1 100644
--- a/userguide/content/en/docs/adding-content/navigation.md
+++ b/userguide/content/en/docs/adding-content/navigation.md
@@ -161,15 +161,21 @@ version selector drop down to the top-level menu.
You can find out more in the guide to
[versioning your docs](/docs/adding-content/versioning/).
-### Adding a language drop-down
+### Adding a language dropdown
-If you configure more than one language in `hugo.toml`, the Docsy theme adds a
-language selector drop down to the top-level menu. Selecting a language takes
-the user to the translated version of the current page, or the home page for the
-given language.
+If you configure more than one language in `hugo.toml`, Docsy adds a language
+selector drop down to the navbar menu. Selecting a language takes the user to
+the translated version of the current page, or the home page for the given
+language. The menu is visible for all screen sizes. By default current site
+language name is shown. On narrow displays, this is replaced by the language
+code.
You can find out more in [Multi-language support](/docs/language/).
+You can control whether the language selector menu appears in the sidebar by
+setting the optional parameter `.ui.sidebar_lang_menu` to `true` (default:
+unset).
+
## Section menu
The section menu, as shown in the left side of the `docs` section, is
diff --git a/userguide/hugo.yaml b/userguide/hugo.yaml
index 1fce1b6856..ad1304d360 100644
--- a/userguide/hugo.yaml
+++ b/userguide/hugo.yaml
@@ -31,6 +31,11 @@ languages:
languageName: English
params:
description: Docsy does docs
+ # Placeholder language used to demo multilingual support
+ xx:
+ languageName: Placeholder
+ params:
+ description: Docsy does multilingual docs
markup:
tableOfContents:
@@ -77,6 +82,7 @@ params:
ui:
showLightDarkModeMenu: true
sidebar_cache_limit: 10
+ sidebar_lang_menu: true # Set to true to show the language menu in the sidebar
sidebar_menu_compact: true
sidebar_menu_foldable: false
sidebar_search_disable: false
@@ -147,5 +153,9 @@ module:
target: content/project/changelog.md
- source: ../CONTRIBUTING.md
target: content/project/contributing.md
+ # Placeholder language used to demo multilingual support
+ - source: content/en
+ target: content
+ lang: xx
# cSpell:ignore docsy github goldmark markmap plantuml readingtime userguide
diff --git a/userguide/static/refcache.json b/userguide/static/refcache.json
index a17b66d25a..d75d10e1e7 100644
--- a/userguide/static/refcache.json
+++ b/userguide/static/refcache.json
@@ -1131,6 +1131,14 @@
"StatusCode": 206,
"LastSeen": "2025-05-22T19:21:14.104646-04:00"
},
+ "https://github.com/google/docsy/pull/2301": {
+ "StatusCode": 206,
+ "LastSeen": "2025-08-02T17:12:43.757038-04:00"
+ },
+ "https://github.com/google/docsy/pull/2303": {
+ "StatusCode": 206,
+ "LastSeen": "2025-08-02T17:12:43.051065-04:00"
+ },
"https://github.com/google/docsy/pull/941": {
"StatusCode": 206,
"LastSeen": "2025-06-10T18:59:25.465236-04:00"
@@ -2227,6 +2235,10 @@
"StatusCode": 200,
"LastSeen": "2025-05-16T09:20:35.492337-04:00"
},
+ "https://www.docsy.dev/": {
+ "StatusCode": 206,
+ "LastSeen": "2025-08-02T16:19:13.783813-04:00"
+ },
"https://www.docsy.dev/about/": {
"StatusCode": 206,
"LastSeen": "2025-05-16T09:20:45.23027-04:00"
@@ -2331,6 +2343,10 @@
"StatusCode": 206,
"LastSeen": "2024-11-06T12:06:01.765051-05:00"
},
+ "https://www.docsy.dev/docs/adding-content/language/#adding-a-language-menu": {
+ "StatusCode": 404,
+ "LastSeen": "2025-08-02T17:12:43.30695-04:00"
+ },
"https://www.docsy.dev/docs/adding-content/lookandfeel/#before-page-content": {
"StatusCode": 206,
"LastSeen": "2025-05-22T13:24:36.066951-04:00"
@@ -2347,6 +2363,10 @@
"StatusCode": 206,
"LastSeen": "2024-11-06T12:08:17.225307-05:00"
},
+ "https://www.docsy.dev/docs/adding-content/navigation/#adding-a-language-drop-down": {
+ "StatusCode": 206,
+ "LastSeen": "2025-08-02T17:42:11.260079-04:00"
+ },
"https://www.docsy.dev/docs/adding-content/navigation/#breadcrumb-navigation": {
"StatusCode": 206,
"LastSeen": "2025-01-08T13:26:58.452656-05:00"