This variant of the Canopy template mirrors the primary starter while giving you a ready-to-use bilingual setup (English default, Spanish secondary). It follows the guidance in content/docs/i18n so you can study the structure and adapt it to your own locales.
canopy.ymldeclares locales for English (default: true) and Spanish, which enables Canopy's locale-aware routing and UI copy.content/contains paired English + Spanish pages (content/index.mdx,content/about/index.mdx,content/es/index.mdx,content/es/sobre.mdx).content/locale.yml+content/es/locale.ymlprovide UI strings and translated route slugs (routes.search,routes.works).content/navigation.yml+content/es/navigation.ymlkeep the main menu localized.- The shared
_app.mdxrenders the built-in header and adds a custom<LanguageToggle />in the footer so you can see how to reposition the control.
- Install dependencies:
npm install. - Run
npm run devto start the builder + preview server. - Update
canopy.ymlwith your IIIF collections/manifests and adjustlocalesif you need more languages. - Add or translate files under
content/<lang>/—keep filenames and folder structure aligned between locales so the toggle can resolve matching routes. - Customize
content/<lang>/locale.ymlfor UI copy,content/<lang>/navigation.ymlfor menu items, and drop translated MDX pages anywhere under that locale folder.
From canopy-iiif/app, run npm run preview:template-i18n to stage this variant into .template-i18n-preview/, install dependencies, and launch npm run dev so you can iterate locally.
Refer to https://canopy-iiif.github.io/app/docs/i18n/ for the full internationalization guide, including optional layouts, language toggle variants, and notes on inheriting navigation or locale entries per directory.