Skip to main content

Localization

Quark Commerce supports multi-language content for all customer-facing entities. Translations are managed via a centralized localization system.

How It Works

The localization system stores translations as key-value pairs keyed by (EntityId, EntityType, PropertyName, LanguageId). When you set X-Language-Code: tr, the API returns Turkish translations for product names, descriptions, category names, etc.

What Gets Localized

EntityLocalized Properties
ProductName, Description
ProductVariantName
CategoryName, Description
BrandName, Description
AttributeName
AttributeValueName
SpecificationName
SpecificationValueValue
Navigation MenuName
Navigation ItemLabel
Legal DocumentTitle, Content

Fallback Behavior

If a translation is not available for the requested language, the API returns the default language value (typically English). This ensures content is always returned, even if translations are incomplete.

Language Selection in Your App

  1. Fetch available languages from /api/storefront/store-config
  2. Let users choose their preferred language (or detect from browser locale)
  3. Send X-Language-Code with every request
// Example: Setting language header in an HTTP client interceptor
intercept(req, next) {
const lang = this.languageService.currentLanguage(); // 'en' | 'tr'
return next.handle(req.clone({
setHeaders: { 'X-Language-Code': lang }
}));
}

Slug Localization

Slugs are also language-aware. The same product can have different slugs per language:

LanguageSlug
Englishclassic-t-shirt-white
Turkishklasik-tisort-beyaz

The slug resolution endpoint (/api/storefront/slugs/{slug}) resolves any language slug to the correct entity. See Slugs & SEO.