From 7f0b861a68dccb798a8ca6a53c1c70228f9512bc Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 3 Aug 2026 11:11:44 +1000 Subject: [PATCH] Enable the language switcher for the French edition Mirrors QuantEcon/lecture-python-programming#490, which adds the same block to the English source. Lists all four editions with current_language set to fr so this edition renders as active, and injects the hreflang alternates for the set. English stays first in the list because the theme uses languages[0] as the hreflang x-default target. Verified with a local build against the theme: the switcher lists all four languages with fr active. Co-Authored-By: Claude Opus 5 (1M context) --- lectures/_config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lectures/_config.yml b/lectures/_config.yml index 9247f62..55284b4 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -36,6 +36,20 @@ sphinx: html_theme: quantecon_book_theme html_static_path: ['_static'] html_theme_options: + languages: + - code: en + name: English + url: https://python-programming.quantecon.org + - code: fa + name: فارسی + url: https://quantecon.github.io/lecture-python-programming.fa + - code: fr + name: Français + url: https://quantecon.github.io/lecture-python-programming.fr + - code: zh-cn + name: 中文 + url: https://quantecon.github.io/lecture-python-programming.zh-cn + current_language: fr authors: - name: Thomas J. Sargent url: http://www.tomsargent.com/