> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/sdks/storefront-js-sdk/translations-and-custom-copy.md).

# 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:

```javascript
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:

```javascript
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:

```javascript
{
  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:

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.firmhouse.com/sdks/storefront-js-sdk/translations-and-custom-copy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
