0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00
astro/.changeset/young-trains-shout.md
Emanuele Stoppa 27d3e86e4c
refactor(i18n): breakdown routing strategy (#9236)
* refactor(i18n): breakdown routing strategy

* changelog

* changeset

* chore: fix rebase

* fix changeset

* chore: update test

* Apply suggestions from code review

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/astro/test/i18n-routing.test.js

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-11-30 05:58:37 -05:00

552 B

astro
patch

The configuration i18n.routingStrategy has been replaced with an object called routing.

export default defineConfig({
  experimental: {
      i18n: {
-          routingStrategy: "prefix-always",
+          routing: {
+              prefixDefaultLocale: true,
+          }  
      }
  }
})
export default defineConfig({
  experimental: {
      i18n: {
-          routingStrategy: "prefix-other-locales",
+          routing: {
+              prefixDefaultLocale: false,
+          }  
      }
  }
})