Skip to content

Commit 7afb509

Browse files
mmckyclaude
andcommitted
Enable the language switcher for the Farsi 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 fa 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 fa active. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 9a337f4 commit 7afb509

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

lectures/_config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ sphinx:
3232
html_theme: quantecon_book_theme
3333
html_static_path: ['_static']
3434
html_theme_options:
35+
languages:
36+
- code: en
37+
name: English
38+
url: https://python-programming.quantecon.org
39+
- code: fa
40+
name: فارسی
41+
url: https://quantecon.github.io/lecture-python-programming.fa
42+
- code: fr
43+
name: Français
44+
url: https://quantecon.github.io/lecture-python-programming.fr
45+
- code: zh-cn
46+
name: 中文
47+
url: https://quantecon.github.io/lecture-python-programming.zh-cn
48+
current_language: fa
3549
authors:
3650
- name: Thomas J. Sargent
3751
url: http://www.tomsargent.com/

0 commit comments

Comments
 (0)