vuestorefront-community / vendure

Vue Storefront 2 integration for Vendure
https://docs.vuestorefront.io/vendure/
MIT License
72 stars 51 forks source link

feat: add a new api-extension to handle localised content from Vendure API #160

Closed julienTeam closed 2 years ago

julienTeam commented 2 years ago

get Localised content from Vendure shop-API

Description

add a new api-extension file : packages/api-client/src/extensions/localiseConfig.ts :

Also updated the i18_n parameter 'strategy' : 'prefix' to correct the language switching bug

Related Issue

https://github.com/vuestorefront-community/vendure/issues/142

Motivation and Context

Localised content from Vendure e-commerce

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

Baroshem commented 2 years ago

Hey hey, sorry for not contact from my side. These days are quite busy. Tomorrow I will take a look at your PR :)

julienTeam commented 2 years ago

Hi @AdamPawlinski and @Baroshem , I just pushed a hack with the 'no prefix' strategy refixed and a new function in LocaleSelector.vue to force the refresh of the page after language switching, I test on a few browser and it seems to work fine for every situation and all pages.

Baroshem commented 2 years ago

@julienTeam could you please run lint command to lint your files? Apart from that this is ready to be merged :)

julienTeam commented 2 years ago

@julienTeam could you please run lint command to lint your files? Apart from that this is ready to be merged :)

Sorry for that, it should be better now ! Thank you,