vendure-demo
vendure-demo copied to clipboard
Add translations to the demo server
Hi @michaelbromley
From https://github.com/vendure-ecommerce/storefront-qwik-starter/pull/91#issuecomment-1518272086
I can think of these steps to add Spanish translations to the demo server. They will be implemented in the script https://github.com/vendure-ecommerce/vendure-demo/blob/master/src/reset-server.ts
Please let me know your thoughts!
1. Global config
Add the new language to the Vendure server. So we need to send to the GlobalSettingsService.updateSettings
service the availableLanguages
the array ["en", "es"]
2. Products
Get all products created by the populate
function and for each one:
2.1 Add to the translations
array the translation to Spanish.
2.2 Call ProductDetailService.updateProduct
.
3. Collections
Get all collections created by the populate
function and for each one:
3.1 Add to the translations
array the translation to Spanish.
3.2 Call CollectionService.update
.
Questions
- Should we keep the same slugs for
es
anden
languages?