Skip to Content
Swift SDKGuidesLocalization

Localization

The Vio SDK supports multiple languages through a configurable translation system.

Overview

  • Multi-language support for SDK components
  • Separate translation files to keep config clean
  • Default English translations built-in
  • Fallback language support

Configuration

vio-config.json:

{ "apiKey": "your-api-key", "environment": "production", "localization": { "defaultLanguage": "es", "fallbackLanguage": "en", "translationsFile": "vio-translations" } }

vio-translations.json (in the same folder):

{ "translations": { "en": { "cart.title": "Cart", "cart.empty": "Your cart is empty", "checkout.title": "Checkout" }, "es": { "cart.title": "Carrito", "cart.empty": "Tu carrito está vacío", "checkout.title": "Checkout" }, "no": { "cart.title": "Handlekurv", "cart.empty": "Handlekurven din er tom", "checkout.title": "Kasse" } } }

Option 2: Inline Translations

{ "apiKey": "your-api-key", "localization": { "defaultLanguage": "es", "fallbackLanguage": "en", "translations": { "en": { "cart.title": "Cart", "checkout.title": "Checkout" }, "es": { "cart.title": "Carrito", "checkout.title": "Checkout" } } } }

Common Translation Keys

KeyDescription
cart.titleCart screen title
cart.emptyEmpty cart message
checkout.titleCheckout screen title
product.addToCartAdd to cart button
product.buyNowBuy now button

Next Steps

Last updated on