Last updated

Language

The Language section provides tools for managing language settings. Language selection affects product descriptions, UI text, and all localized content throughout the shopping experience.


What's Included

FunctionDescription
getLanguageGet the current language code
updateLocaleSettingsUpdate language and country settings

Benefits

  • Localized Content — Product descriptions and UI display in the visitor's language
  • Multi-Language Support — Support for multiple languages configured in your shop
  • Seamless Switching — Language can be changed without losing cart or session data
  • SEO Friendly — Proper language settings help with international SEO

Quick Example

// Get current language
const language = window.FairShareSDK.getLanguage();
console.log('Language:', language); // e.g., "en"

// Update language setting
await window.FairShareSDK.updateLocaleSettings({
  language: "es"
});