Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translations to the demo server #38

Open
giovramirez opened this issue May 5, 2023 · 0 comments
Open

Add translations to the demo server #38

giovramirez opened this issue May 5, 2023 · 0 comments

Comments

@giovramirez
Copy link

Hi @michaelbromley

From vendure-ecommerce/storefront-qwik-starter#91 (comment)

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

  1. Should we keep the same slugs for es and en languages?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant