Skip to content

Translation of the customer privacy banner #2408

Answered by wizardlyhel
edgaresg asked this question in Help
Discussion options

You must be logged in to vote

If you urgently need to get it working before we make a release in early Sept, you can run the loadBanner command again in a useEffect.

Here is an example JavaScript snippet to run if you are on hydrogen.shop. This will update the cookie banner to show French version of the banner.

window.privacyBanner.loadBanner({
  checkoutRootDomain: "checkout.hydrogen.shop",
  shopDomain: "hydrogen-preview.myshopify.com",
  storefrontAccessToken: "<PUBLIC_STOREFRONT_API_TOKEN>",
  storefrontRootDomain: "checkout.hydrogen.shop",
  locale: "fr",
  country: "ca",
});

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@edgaresg
Comment options

@wizardlyhel
Comment options

Answer selected by edgaresg
@edgaresg
Comment options

@wizardlyhel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants