Skip to content

Commit

Permalink
docs: remove duplicate page
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede committed Sep 14, 2024
1 parent 2aec99d commit d2fa9e6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 62 deletions.
62 changes: 0 additions & 62 deletions docs/content/docs/5.v9/2.guide/18.breaking-changes-in-v9.md

This file was deleted.

37 changes: 37 additions & 0 deletions docs/content/docs/5.v9/2.guide/19.breaking-changes-in-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,40 @@ The types and names have been fixed in v9, if you have been using the unprefixed
- `localeLocation` -> `$localeLocation`
- `switchLocalePath` -> `$switchLocalePath`
- `localeHead` -> `$localeHead`

## Removal of deprecated `dynamicRouteParams` option and legacy dynamic route parameters implementation

Setting dynamic route parameters by setting the `nuxtI18n` property with `definePageMeta` has been fully removed in favor of the [`useSetI18nParams` composable](/docs/api#useseti18nparams), this feature is enabled by default which means the `dynamicRouteParams` option is no longer necessary.

The composable usage is similar to that of the deprecated implementation, see the migration example below:

```html
<script>
definePageMeta({
nuxtI18n: {
en: { id: 'my-post' },
fr: { id: 'mon-article' }
}
})
</script>
<template>
<!-- pages/post/[id].vue -->
</template>
```

Should be changed to:

```html
<script>
const setI18nParams = useSetI18nParams();
setI18nParams({
en: { id: 'my-post' },
fr: { id: 'mon-article' }
})
</script>
<template>
<!-- pages/post/[id].vue -->
</template>
```

Check out the [Lang Switcher](/docs/guide/lang-switcher#dynamic-route-parameters) guide for more details.

0 comments on commit d2fa9e6

Please sign in to comment.