You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/internationalization.md
-68Lines changed: 0 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,71 +154,3 @@ export default {
154
154
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.
155
155
156
156
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
-
exportdefault {
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
-
exportdefault {
215
-
i18n: {
216
-
cookieOptions: {
217
-
// default attributes used by the `@vue-storefront/nuxt` module
0 commit comments