Can the template support languages other than English?
Yes, the template can now support languages other than English.
How it works
- When the customers visit the BYOB bundle page, the app will detect the active language of your store
- If the locale is supported, the corresponding language will be displayed
- Otherwise, the page always fallbacks to display English
Supported languages:
- English
- Japanese
- Spanish
- Traditional Chinese
- French
- German
- Polish
You can change the translation in the Shopify Langauge Editor. Just visit BYOB => Settings => Change Text. You'll be redirected to the language editor in the Shopify admin.
The translation format:
- {quantity} is the variable we put in. Include {VARIABLE} in your translation
- the pipe | is for pluralization, the left side is a single unit, the right side is for multiple units
p.s. Traditional Chinese is mainly used in Hong Kong and Taiwan, not China.
How to change the text in another language:
For Liquid template users:
You can add language translations using the Translate & Adapt app.
- Visit the language editor via the BYOB settings => Change Text
- Hit the localize button in the language editor
- Visit the section and change the text
For more info, please refer to Add language translations using the Translate & Adapt app
For theme app extension users:
At this moment, Shopify doesn't support changing texts in the theme app extension. Shopify is trying to add the missing feature but there is no confirmed timeline yet. As a workaround, you can add a custom liquid section in the theme extension.
- For example, if you want to change the French translation, you can change the French text in the code below:
<script> byob_custom_messages = { "fr": { message: { addMore: 'Ajouter 1 article de plus | Ajouter {quantity} articles', addMoreFrom: 'Ajouter 1 article depuis {title}', addToBundle: 'Ajouter au kit', addBundleToCart: 'Ajouter le kit au panier', alertSoldOut: 'Cet article est en rupture de stock. Veuillez en choisir un autre', bundleAddedToCart: 'Le kit a été ajouté au panier !', addToCartButtonTooltip: 'Veuillez ajouter plus d'articles pour compléter le lot!', loadMore: 'Voir plus', loading: 'Chargement...', pick: 'Sélectionner', soldOut: 'Epuisé', any: '', atLeast: ' au moins ', maximumOf: ' maximum ', lessThan: ' moins que ', tabHeading: 'Seléctionner {operator}{quantity} article(s) depuis {title}', totalPrice: 'Prix total', saved: 'Sauvegarder', unavailable: 'Non disponible', viewCart: 'Voir panier', selectOnce: 'Vous ne pouvez acheter le produit qu'une seule fois!', noteHeader: 'Ajouter une note', required: 'Obligatoire', checkout: 'Procéder Au Paiement', createAnother: 'Construire un autre costume', quantity: 'Quantité', optional: 'Optionnel', quickviewIconText: 'Vior' } } } </script>
- Hit Change Design in BYOB. Add a new custom liquid section in the theme editor
- Copy and paste the content to the custom liquid section.
- Hit save to view the change