Skip to content

Commit c959020

Browse files
committed
docs: remove outdated information
1 parent a7d27b8 commit c959020

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

docs/getting-started/internationalization.md

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -154,71 +154,3 @@ export default {
154154
If this is a limitation for you, or if you don't want to have currencies tied to locales, you can disable this mechanism and provide your own.
155155

156156
To disable it, set `autoChangeCookie.currency` to `false` as described in the section below.
157-
158-
## Configuring the Auto Cookie Change
159-
160-
You can configure how `@vue-storefront/nuxt` handles cookie changes when the locale changes with the `autoChangeCookie` object.
161-
162-
The `autoChangeCookie` object holds three properties directly linked to `currency`, `locale`, and `country`. These properties control how the module handles changing cookies.
163-
164-
If set to `false`, the module won't change any cookies based on configurations or browser locale, and the integration will have to handle it.
165-
166-
```js
167-
// nuxt.config.js
168-
169-
export default {
170-
buildModules: [
171-
[
172-
'@vue-storefront/{INTEGRATION}/nuxt',
173-
{
174-
i18n: {
175-
useNuxtI18nConfig: true,
176-
},
177-
},
178-
],
179-
],
180-
i18n: {
181-
locales: [
182-
{
183-
code: 'en',
184-
label: 'English',
185-
file: 'en.js',
186-
iso: 'en',
187-
},
188-
{
189-
code: 'de',
190-
label: 'German',
191-
file: 'de.js',
192-
iso: 'de',
193-
},
194-
],
195-
defaultLocale: 'en',
196-
autoChangeCookie: {
197-
currency: false,
198-
locale: false,
199-
country: false,
200-
},
201-
},
202-
};
203-
```
204-
205-
## Configuring cookie attributes
206-
207-
You can overwrite the default `locale`, `currency`, and `country` cookie attributes set by `@vue-storefront/nuxt` or add custom attributes.
208-
209-
To do so, add the `cookieOptions` object to the `i18n` configuration object in the `nuxt.config.js` file and specify the attributes you'd like the cookies to have.
210-
211-
```js
212-
// nuxt.config.js
213-
214-
export default {
215-
i18n: {
216-
cookieOptions: {
217-
// default attributes used by the `@vue-storefront/nuxt` module
218-
path: '/',
219-
sameSite: 'lax',
220-
expires: new Date(new Date().setFullYear(new Date().getFullYear() + 1)),
221-
},
222-
},
223-
};
224-
```

0 commit comments

Comments
 (0)