A monolithic frontend that ships all language variants in one bundle gets heavy fast. When the product serves ten or more locales — especially RTL ones mixed with LTR — the bundle size and layout logic become a maintenance drag.
The JSON-layout approach
Instead of compiled templates per locale, the backend returns a layout descriptor:
{ "direction" : "ltr" , "sections" : [ { "type" : "hero" , "title_key" : "home.hero" , "cta_key" : "home.cta" } , { "type" : "grid" , "columns" : 3 , "items_key" : "home.featured" } ] }
Enter fullscreen mode
Exit fullscreen mode
The frontend renders each section from a component registry, and direction is applied at the root <div dir={direction}> — no per-component RTL overrides.
Handling Uzbek and Cyrillic
Uzbek can appear in Latin script ( oʻzbek ) or Cyrillic ( ўзбек ). A multi-locale site like Mostbet has to decide at the routing layer which script variant to serve, usually from a cookie set during onboarding.…