How do I translate the language displayed by the app?

When our app needs to display text, it will use the values from the bcpoStrings JavaScript object.

You can change the default values by adding this code to your theme.liquid file right after the <head> tag and replacing the text between the single quotes:

var bcpoStrings = {
choose_one: 'Choose one',
quantity: 'Quantity',
please_select: 'Please select',
and: 'and',
or: 'or',
sold_out: 'sold out',
unavailable: 'unavailable',
add_to_cart: 'Add to Cart',
multiselect_message: 'Please choose at least one value for',
at_most: 'at most',
at_least: 'at least',
items: 'items',
selection: 'Selection will add',
selection2: 'to the price',
you_save: 'You Save',
item_added: 'Item added to the cart',
keep_shopping: 'Keep shopping',
view_cart: 'View cart',
theme2_message: 'Please finish customizing your product',

window.bcpoSelections = 'Selections';
window.bcpoVariant = 'Variant';
The text for the file upload, and “Please select” warnings are controlled by the language setting in the browser. If the users has English selected as their default language then English will show. If they have Spanish selected for their language Spanish will show etc.

To translate the other text in the app (product option titles & values) you can use one of these translation apps recommended in this article.
Was this article helpful?

Pin It on Pinterest