Translations and custom copy

The Firmhouse Storefront JS SDK comes with English and Dutch translations. It is automatically translated based on the customers browser settings. You can also force specific language so it won't depend on the browser.

If you want, you can add additional languages, or modify our default translation strings.

Just add or override any strings in the window.Firmhouse = {} code upon loading the Storefront JS SDK in your website or e-commerce theme.

Some examples:

Changing what the Cart is called

If you want the Your Cart title to be called Your Subscription set up your window.Firmhouse = {} configuration as follows:

window.Firmhouse = {
  storefrontToken: "XXX",
  translations: {
    en: {
      cart: {
        your_cart: "Your Subscription"
      }
    }
  }
}

Adding another language

If you want to add another language, like German, you can do so as follows:

window.Firmhouse = {
  storefrontToken: "XXX",
  translations: {
    en: {
      cart: {
        your_cart: "Your Cart"
      }
    },
    de: {
      cart: {
        your_cart: "Zum Warenkorb"
      }
    }
  }
}

All translation keys

Here is a list of all available translation keys and their default value per language:

{
  en: {
    cart: {
      your_cart: "Your cart",
      to_pay_now: "Pay now",
      total_per_month: "Per month",
      shipping_note: "Shipping costs will be calculated at next step.",
      checkout: "Checkout",
      empty: "Your cart is empty",
    },
    alert: {
      item_added: "Item added to your cart",
      view_cart: "View cart & checkout",
      continue_shopping: "Continue shopping",
    },
    ordered_product: {
      remove: "Remove",
    },
  },
  nl: {
    cart: {
      your_cart: "Je winkelwagen",
      to_pay_now: "Nu te betalen",
      total_per_month: "Totaal per maand",
      shipping_note: "Verzendekosten worden bij de volgende stap berekend.",
      checkout: "Afrekenen",
      empty: "Je winkelwagen is leeg",
    },
    alert: {
      item_added: "Toegevoegd aan je winkelwagen",
      view_cart: "Winkelwagen bekijken & afrekenen",
      continue_shopping: "Verder shoppen",
    },
    ordered_product: {
      remove: "Verwijderen",
    },
  },
}

Forcing specific language

If you want to set specific language and ignore browser settings, you can pass the language argument:

window.Firmhouse = {
  storefrontToken: "XXX",
  language: "de",
  translations: {
    de: {
      cart: {
        your_cart: "Zum Warenkorb"
      }
    }
  }
}

Last updated

#33: Shopify SSO Connection

Change request updated