Skip to content

Commit

Permalink
DEVDOCS-5111 : [update] add localization information (#16)
Browse files Browse the repository at this point in the history
<!-- Ticket number or summary of work -->
# [DEVDOCS-5111]


## What changed?
Provide information and a reference to how to localize the files.

## Release notes draft
<!-- Provide an entry for the release notes using simple, conversational
language. Don't be too technical. Explain how the change will benefit
the merchant and link to the feature.

Examples:
* The newly-released [X feature] is now available to use. Now, you’ll be
able to [perform Y action].
* We're happy to announce [X feature], which can help you [perform Y
action].
* [X feature] helps you to create [Y response] using the [Z query
parameter]. Now, you can deliver [ex, localized shopping experiences for
your customers].
* Fixed a bug in the [X endpoint]. Now the [Y field] will appear when
you click [Z option]. -->
* 

## Anything else?
<!-- Add related PRs, salient notes, additional ticket numbers, etc. -->

ping {names}


[DEVDOCS-5111]:
https://bigcommercecloud.atlassian.net/browse/DEVDOCS-5111?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: bc-andreadao <[email protected]>
  • Loading branch information
2 people authored and bc-tgomez committed Apr 26, 2024
1 parent 7fe1332 commit 4e6b555
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@ To install a custom order confirmation page on a store, follow these steps:

### Install using the V3 Checkout API
To install a custom checkout on a store, use the [Update Checkout Settings](/docs/rest-management/checkouts/checkout-settings#update-checkout-settings) endpoint to install the loader file.

#### Implementing localization
You can customize your checkout page and customer order confirmation page to display in any one language of your choice. To localize your checkout, download and extract your Stencil theme. Navigate to the `/lang` subfolder, which includes the [`en.json`](https://github.com/bigcommerce/checkout-js/blob/master/packages/locale/src/translations/en.json) English language file. Create a new translation file (i.e., `es.json`) and copy the translation files across from [checkout.js](https://github.com/bigcommerce/checkout-js) into Cornerstone. Use `{{lang checkout.my-string}}` or `{{lang order-confirmation.my-string}}` and enter the key-value pairs. The example below shows English and Spanish strings.

In `en.json`, add `checkout` key and corresponding information for the value.

```json showLineNumbers copy
"checkout": {
"title": "Checkout"
}
```
In `es.json`, add the same `checkout` key and the Spanish translation of the value.

```json showLineNumbers copy
"checkout": {
"title": "Pago"
}
```

For more details on how to add translation keys to a language file, see the [Localization Tutorial] (https://developer.bigcommerce.com/docs/storefront/stencil/themes/localization/tutorial).


## Related resources

Expand Down

0 comments on commit 4e6b555

Please sign in to comment.