/* i18n.jsx — EN/ES translations + language context */ const TRANSLATIONS = { en: { // Nav nav: { home: 'Home', portfolio: 'Portfolio', services: 'Services', about: 'About', contact: 'Contact', cta: 'Schedule a viewing', tagline: 'Infrastructure Visualization', }, // Hero hero: { slides: [ { eyebrow: 'Reel · UE5 cinematic build', title: ['Visualization,', 'in motion'], accent: 'in motion', sub: 'Hero films, real-time walkthroughs and AI-augmented concept work for data centers, BESS facilities, and renewable energy operators.', caption: 'QTS · Cinematic After Reel · UE5', }, { eyebrow: 'Oil & gas infrastructure', title: ['Oil & gas 3D visuals', 'that close deals'], accent: 'that close deals', sub: 'Process plants, administrative buildings, transmission corridors — rendered at golden hour to make the financing case impossible to ignore.', caption: 'Pampa Energía · Process Plant · Sunset Hero', }, { eyebrow: 'Real-time camera', title: ['Camera moves', 'through finished sites'], accent: 'through finished sites', sub: 'A slow dolly across the campus — modeled to surveyed coordinates, lit to real spec, rendered live in Unreal Engine 5.', caption: 'Studio reel · Real-time camera · UE5', }, { eyebrow: 'Inside the hall', title: ['Server halls,', 'rendered like film sets'], accent: 'rendered like film sets', sub: 'Branded data halls in cinematic light — the red glow, the endless aisle, the signage. The cathedrals of the compute era.', caption: 'QTS · Data Hall Interior · UE5', }, { eyebrow: 'Site in context', title: ['Campuses set', 'into their landscape'], accent: 'into their landscape', sub: 'Riverside data center campus at dawn — surrounding industry, transmission, water, green buffer. The full context in a single frame.', caption: 'Data Center Campus · Riverside · Aerial', }, { eyebrow: 'Architectural cinematography', title: ['Interiors that', 'sell the experience'], accent: 'sell the experience', sub: 'A technician walks the cold aisle as the sun sets behind the cooling towers — film-grade lighting, real materials, real scale.', caption: 'DataCore · Cold Aisle · UE5 Path Traced', }, { eyebrow: 'Crypto & HPC', title: ['Compute campuses,', 'at neon dusk'], accent: 'at neon dusk', sub: 'BTC and HPC facilities lit with the brand\'s own signature — addressable data halls, river frontage, the works.', caption: 'BTC Data Center · Dusk · Brand Lighting', }, { eyebrow: 'Plan → reality', title: ['Complex layouts,', 'translated to cinema'], accent: 'translated to cinema', sub: 'We start where your architect leaves off. CAD drawings, BIM models, and block diagrams become path-traced cinematic frames — the same project, two languages.', caption: 'BESS · Plan → Render · Side-by-Side', }, { eyebrow: 'From the documents', title: ['We work from', 'your actual drawings'], accent: 'your actual drawings', sub: 'Level plans at 1:400, generator yards, fuel tanks, cooling plants — modeled to your real spec, not stock geometry. Surveyed coordinates in, hero frames out.', caption: 'Level 01 Plan · Scale 1:400 · Source Document', }, { eyebrow: 'Isometric clarity', title: ['3D models', 'that read at a glance'], accent: 'read at a glance', sub: 'Clean isometric studies for board packs, permit hearings, and operations briefings — the building, the rooftop chillers, the parking choreography, all callable.', caption: 'Data Center · Iso Reference · UE5', }, { eyebrow: 'Industrial scale', title: ['Process plants,', 'energy storage,', 'data centers'], accent: 'energy storage', sub: 'From oil-and-gas process plants to GW-scale battery storage — the most consequential buildings of the century, modeled with the same discipline.', caption: 'Pampa Energía · Process Plant · Iso', }, { eyebrow: 'Real-time camera', title: ['Cinematic moves.', 'Engineered detail.'], accent: 'Engineered detail', sub: 'A camera dolly through a finished site — modeled to surveyed coordinates, lit to real spec, rendered in UE5.', caption: 'Studio reel · Real-time camera · UE5', }, { eyebrow: 'Energy storage', title: ['Energy infrastructure,', 'engineered'], accent: 'engineered', sub: 'From the master plan to the hero frame — cinematic visualization for BESS, solar, and substation projects, delivered at 8K.', caption: 'Meridian BESS · Sunset Approach · UE5 Path Traced', }, { eyebrow: 'Brand architecture', title: ['3D energy visuals', 'that win investors'], accent: 'win investors', sub: 'Project-finance-grade visualization — built on a single hero render that anchors the entire investor narrative.', caption: 'JMC Realities · Night Facade · Brand Hero', }, { eyebrow: 'Site context', title: ['Built for uptime.', 'Rendered for trust.'], accent: 'trust', sub: 'From exterior approach to inside-the-hall detail — modeled to surveyed coordinates, lit to your real spec, delivered at 16K.', caption: 'QTS · Mountain Site · UE5', }, { eyebrow: 'AI-augmented pipeline', title: ['Concepts in hours.', 'Final pixels, path-traced.'], accent: 'path-traced', sub: 'In-house fine-tunes accelerate concept work — every final frame still goes through the full UE5 path-tracing pipeline.', caption: 'Pampa Energía · Aerial · Hero Frame', }, ], ctaPrimary: 'View the portfolio', ctaSecondary: 'Schedule a viewing', ctaSingle: 'Discuss your project', scrollCue: 'Scroll to explore', }, // Home home: { capabilities: { eyebrow: 'What we do', title: 'Cinematic visualization for the data center industry.', seeAll: 'All capabilities', }, stats: [ { value: '10+', label: 'Projects delivered' }, { value: '3.2 GW', label: 'Capacity visualized' }, { value: '2', label: 'Countries' }, { value: '2024', label: 'Founded' }, ], featured: { eyebrow: 'Featured project', title: 'Meridian BESS — sunset to investors.', meta: 'Energy Storage · 800 MWh · Texas, USA', body: 'A complete visualization package for an 800 MWh utility-scale BESS facility — modeled to surveyed coordinates, lit to the operator\'s real sodium-mercury site spec, delivered as a 16K hero plus a real-time pitch build that closed the Series B.', specs: [ ['Capacity', '800 MWh'], ['Hero film', '4:32'], ['Stills delivered', '12 · 16K'], ['Outcome', 'Series B closed'], ], primary: 'View case study', secondary: 'Discuss your project', }, grid: { eyebrow: 'Selected work', title: 'A measured portfolio.', seeAll: 'See all 5+ projects', }, process: { eyebrow: 'Our process', title: 'Six steps. No surprises.', more: 'More about our studio', }, cta: { eyebrow: 'Begin a project', title: 'Schedule a 30-minute viewing of recent work.', body: 'We\'ll show you the most relevant case from your sector under NDA — and walk through what an engagement looks like, from brief to hand-off.', primary: 'Schedule a viewing', secondary: 'Browse portfolio', }, marquee: ['Unreal Engine 5', 'AI Augmented', 'Path Traced', '8K Hero Film', 'Real-Time Builds', '16K Stills', 'NDA Friendly', 'NVIDIA Studio Partner'], }, // Portfolio portfolio: { eyebrow: 'Portfolio', title: ['120 projects.', '3.2 gigawatts.', 'One studio.'], sub: 'A measured selection of recent work. Roughly a third of our active engagements live under NDA and are not shown here — please get in touch for sector-specific case studies.', filters: { all: 'All projects', hyperscale: 'Hyperscale', energy: 'Energy / BESS', solar: 'Solar', liquid: 'Liquid-Cooled', ai: 'AI / GPU', modular: 'Modular', }, sort: 'Sort', sortOptions: { recent: 'Most Recent', capacity: 'Capacity', alpha: 'A → Z' }, countOf: 'of', empty: 'No projects match this filter.', ndaCta: { eyebrow: 'Under NDA', title: 'The work you can\'t see is often our best.', body: 'Around a third of our active engagements are confidential. We\'re happy to walk through a sector-relevant case study under NDA — please get in touch.', primary: 'Schedule a private viewing', }, modal: { client: 'Client', location: 'Location', capacity: 'Capacity', delivered: 'Delivered', deliverables: 'Deliverables', primary: 'Discuss a similar project', secondary: 'Back to portfolio', }, }, // Services services: { hero: { eyebrow: 'Services & capabilities', title: 'The full pipeline, in one studio.', sub: 'Pre-vis to final frame, real-time to broadcast, concept passes to investor decks — six capabilities, one team, one timeline.', primary: 'Schedule a viewing', secondary: 'See work', }, capabilitiesTitle: 'Six deliverables, one studio.', stackTitle: 'Stack & infrastructure.', processTitle: 'From brief to hand-off.', }, // About about: { eyebrow: 'About the studio', title: 'A visualization studio built for an industry that didn\'t have one.', intro: 'JMC Realities was founded in 2024 to bring film-grade visualization to data center architecture : a sector that, until recently, had been served by spreadsheet renderings, marketing diagrams, and PowerPoint elevations. We work for hyperscale operators, infrastructure developers, and the capital that funds them.', storyTitle: 'Eight years. Six continents. One method.', storyEyebrow: 'Story', principlesEyebrow: 'Principles', principlesTitle: 'How we work.', teamEyebrow: 'Leadership', teamTitle: 'The team.', teamCta: 'Open positions', partnersEyebrow: 'Partners & affiliations', partnersTitle: 'Selected memberships.', story: [ { year: '2018', title: 'A film crew, redirected.', body: 'James Cordell left Pixar to start a studio that would treat data centers — the cathedrals of the compute era — with the same cinematic care given to feature films.' }, { year: '2021', title: 'Real-time, end-to-end.', body: 'Mei Chen joined to move the entire pipeline to Unreal Engine 5. Within a year, JMC was delivering real-time pitch builds alongside hero films.' }, { year: '2024', title: 'AI in the pipeline.', body: 'Priya Ramanathan stood up the AI augmentation team. Concept passes that used to take a week now run in an afternoon.' }, ], principles: [ ['Measured over loud', 'Cinematic photography lives in restraint. We render to your real spec — not a stylized fantasy.'], ['One studio, one timeline', 'Modeling, lighting, AI augmentation, and composite are all in-house. Nothing waits in a vendor queue.'], ['Path-traced final pixels', 'AI accelerates concepts. Every final frame goes through UE5 path tracing. No exceptions.'], ['Engineered for the long horizon', 'Data center architecture serves decades. Our visualizations are built to age with the building.'], ], cta: { eyebrow: 'Talk to us', title: 'Two ways to start.', body: 'Schedule a viewing of recent work, or send us a brief — we\'ll respond within one business day.', primary: 'Schedule a viewing', secondary: 'View portfolio', }, }, // Contact contact: { hero: { eyebrow: 'Get in touch', title: 'Tell us about your project.', sub: 'Email us, tell us about your project, and we\'ll respond within one business day with relevant case studies and a scoping call.', }, side: { contactDirect: 'Contact directly', responseTitle: 'Response time', responseBody: 'One business day. Most viewings are scheduled within five business days.', }, form: { title: 'Send us a message', firstName: 'First name', lastName: 'Last name', company: 'Company', email: 'Email', phone: 'Phone', interest: 'I\'m interested in', interestOptions: ['Hero film', 'Real-time build', 'Digital twin', 'Solar / BESS', 'Pre-visualization', 'Other / not sure'], message: 'Tell us about your project', messagePlaceholder: 'Briefly — sector, scope, timeline, anything specific you\'d like covered. A few lines is fine.', optional: '(optional)', submit: 'Send message', sending: 'Sending…', }, success: { eyebrow: 'Message received', title: 'Thanks — we\'ll be in touch.', body: 'A confirmation is on its way to', bodyAfter: '. Expect a personal reply within one business day.', primary: 'Browse the portfolio', secondary: 'Send another', nextEyebrow: 'What happens next', next: [ ['01', 'Confirmation', 'Email confirmation in a few minutes.'], ['02', 'Personal reply', 'Within one business day, from our creative director.'], ['03', 'A 30-min call', 'We\'ll walk through relevant work and scope your project.'], ], }, faq: { eyebrow: 'FAQ', title: 'Frequently asked.', }, }, // Footer footer: { tagline: 'Cinematic architectural visualization for the data center industry — Unreal Engine 5, AI-augmented, engineered for the long horizon.', columns: { capabilities: 'Capabilities', portfolio: 'Portfolio', studio: 'Studio', contact: 'Contact', }, bottom: '© 2026 JMC Realities, Ltd. · A visualization studio', privacy: 'Privacy', terms: 'Terms', cookies: 'Cookie Preferences', }, }, es: { nav: { home: 'Inicio', portfolio: 'Portfolio', services: 'Servicios', about: 'Estudio', contact: 'Contacto', cta: 'Contactanos', tagline: 'Visualización de Infraestructura', }, hero: { slides: [ { eyebrow: 'Reel · Unreal Engine 5', title: ['Visualización cinemática', 'de infraestructura'], accent: 'cinemática', sub: 'Films, recorridos en tiempo real y trabajo conceptual con IA para data centers, almacenamiento de energía y renovables.', caption: 'QTS · After Reel Cinematográfico · UE5', }, { eyebrow: 'Del plano a la imagen', title: ['Convertimos planos complejos', 'en imágenes que se entienden'], accent: 'en imágenes que se entienden', sub: 'Empezamos donde termina tu arquitecto. Planos técnicos y modelos 3D se transforman en imágenes cinematográficas — el mismo proyecto, contado para que cualquiera lo entienda.', caption: 'BESS · Plano y Render · Lado a Lado', }, { eyebrow: 'Desde tus documentos', title: ['Trabajamos sobre', 'tus planos reales'], accent: 'tus planos reales', sub: 'Plantas a escala, salas técnicas, generadores, sistemas de refrigeración — modelados según tu proyecto real, no geometría genérica.', caption: 'Planta Nivel 01 · Escala 1:400 · Documento Fuente', }, { eyebrow: 'Claridad isométrica', title: ['Modelos 3D', 'que se leen de un vistazo'], accent: 'que se leen de un vistazo', sub: 'Vistas isométricas claras para directorios, audiencias públicas y presentaciones — el edificio, los equipos, la circulación, todo legible en una sola imagen.', caption: 'Data Center · Vista Isométrica · UE5', }, { eyebrow: 'Escala industrial', title: ['Plantas industriales,', 'energía,', 'data centers'], accent: 'energía', sub: 'De plantas de proceso a grandes proyectos de almacenamiento — las obras más relevantes del momento, modeladas con la misma precisión.', caption: 'Pampa Energía · Planta de Proceso · Vista Isométrica', }, { eyebrow: 'Cámara en tiempo real', title: ['Movimientos de cine.', 'Precisión técnica.'], accent: 'Precisión técnica', sub: 'Un recorrido de cámara por un sitio terminado — modelado sobre coordenadas reales, iluminado según tu proyecto, renderizado en Unreal Engine 5.', caption: 'Reel del estudio · Cámara en tiempo real · UE5', }, { eyebrow: 'Energía', title: ['Imágenes que cuentan', 'la historia del proyecto'], accent: 'la historia del proyecto', sub: 'Del plan maestro a la imagen final — visualización cinemática para almacenamiento, solar y subestaciones, entregada en 8K.', caption: 'Meridian BESS · Atardecer · UE5', }, { eyebrow: 'Imagen de marca', title: ['Imágenes 3D de energía', 'que convencen inversores'], accent: 'que convencen inversores', sub: 'Visualización a la altura de una ronda de inversión — una sola imagen que sostiene toda la presentación.', caption: 'JMC Realities · Fachada Nocturna · Imagen de Marca', }, { eyebrow: 'El sitio y su contexto', title: ['Pensado para operar.', 'Renderizado para convencer.'], accent: 'Renderizado para convencer', sub: 'De la aproximación exterior al detalle interior — modelado sobre coordenadas reales, iluminado según tu proyecto, entregado en 16K.', caption: 'QTS · Sitio en Montaña · UE5', }, { eyebrow: 'Flujo aumentado con IA', title: ['Conceptos en horas.', 'Imágenes finales, impecables.'], accent: 'Imágenes finales, impecables', sub: 'Nuestros modelos de IA propios aceleran la etapa conceptual — cada imagen final pasa por el render completo en Unreal Engine 5.', caption: 'Pampa Energía · Vista Aérea · Imagen Final', }, ], ctaPrimary: 'Ver el portfolio', ctaSecondary: 'Contactanos', ctaSingle: 'Conversemos tu proyecto', scrollCue: 'Desliza para explorar', }, home: { capabilities: { eyebrow: 'Qué hacemos', title: 'Visualización cinematográfica para la industria de data centers.', seeAll: 'Todas las capacidades', }, stats: [ { value: '10+', label: 'Proyectos entregados' }, { value: '3.2 GW', label: 'Capacidad visualizada' }, { value: '2', label: 'Países' }, { value: '2024', label: 'Fundado' }, ], featured: { eyebrow: 'Proyecto destacado', title: 'Meridian BESS — del atardecer a los inversores.', meta: 'Almacenamiento · 800 MWh · Texas, EE.UU.', body: 'Pack completo de visualización para una facility BESS utility-scale de 800 MWh — modelada sobre coordenadas reales, iluminada al spec real del sitio, entregada como hero 16K más un build de tiempo real que cerró la Serie B.', specs: [ ['Capacidad', '800 MWh'], ['Hero film', '4:32'], ['Stills entregados', '12 · 16K'], ['Resultado', 'Serie B cerrada'], ], primary: 'Ver caso', secondary: 'Conversar tu proyecto', }, grid: { eyebrow: 'Trabajo seleccionado', title: 'Un portfolio medido.', seeAll: 'Ver los 5+ proyectos', }, process: { eyebrow: 'Nuestro proceso', title: 'Seis pasos. Sin sorpresas.', more: 'Más sobre el estudio', }, cta: { eyebrow: 'Empezar un proyecto', title: 'Agenda una visita privada de 30 minutos.', body: 'Te mostramos el caso más relevante de tu sector bajo NDA — y explicamos cómo es trabajar con nosotros, del brief al entregable.', primary: 'Contactanos', secondary: 'Explorar portfolio', }, marquee: ['Unreal Engine 5', 'Aumentado con IA', 'Path Traced', 'Hero Film 8K', 'Builds en Tiempo Real', 'Stills 16K', 'NDA Friendly', 'NVIDIA Studio Partner'], }, portfolio: { eyebrow: 'Portfolio', title: ['120 proyectos.', '3.2 gigawatts.', 'Un estudio.'], sub: 'Una selección medida de trabajo reciente. Aproximadamente un tercio de nuestros proyectos activos están bajo NDA y no se muestran aquí — contáctanos para casos específicos de tu sector.', filters: { all: 'Todos', hyperscale: 'Hyperscale', energy: 'Energía / BESS', solar: 'Solar', liquid: 'Refrigeración líquida', ai: 'IA / GPU', modular: 'Modular', }, sort: 'Ordenar', sortOptions: { recent: 'Más recientes', capacity: 'Capacidad', alpha: 'A → Z' }, countOf: 'de', empty: 'No hay proyectos que coincidan con este filtro.', ndaCta: { eyebrow: 'Bajo NDA', title: 'El trabajo que no podés ver es a menudo el mejor.', body: 'Un tercio de nuestros proyectos activos son confidenciales. Podemos mostrarte un caso relevante a tu sector bajo NDA — escribinos.', primary: 'Contactanos', }, modal: { client: 'Cliente', location: 'Ubicación', capacity: 'Capacidad', delivered: 'Entregado', deliverables: 'Entregables', primary: 'Conversar un proyecto similar', secondary: 'Volver al portfolio', }, }, services: { hero: { eyebrow: 'Servicios y capacidades', title: 'El pipeline completo, en un estudio.', sub: 'Pre-vis a frame final, tiempo real a broadcast, conceptos a decks de inversión — seis capacidades, un equipo, un timeline.', primary: 'Contactanos', secondary: 'Ver trabajo', }, capabilitiesTitle: 'Seis entregables, un estudio.', stackTitle: 'Stack & infraestructura.', processTitle: 'Del brief a la entrega.', }, about: { eyebrow: 'Sobre el estudio', title: 'Un estudio de visualización construido para una industria que no lo tenía.', intro: 'JMC Realities se fundó en 2024 para llevar la visualización de nivel cinematográfico a la arquitectura de data centers — un sector que, hasta hace poco, se servía de renders en spreadsheets, diagramas de marketing y elevaciones en PowerPoint. Trabajamos para operadores hyperscale, desarrolladores de infraestructura y el capital que los financia.', storyTitle: 'Ocho años. Seis continentes. Un método.', storyEyebrow: 'Historia', principlesEyebrow: 'Principios', principlesTitle: 'Cómo trabajamos.', teamEyebrow: 'Liderazgo', teamTitle: 'El equipo.', teamCta: 'Posiciones abiertas', partnersEyebrow: 'Partners y afiliaciones', partnersTitle: 'Membresías seleccionadas.', story: [ { year: '2018', title: 'Un equipo de cine, redirigido.', body: 'James Cordell dejó Pixar para iniciar un estudio que tratara a los data centers — las catedrales de la era del cómputo — con el mismo cuidado cinematográfico que un feature film.' }, { year: '2021', title: 'Tiempo real, de punta a punta.', body: 'Mei Chen se sumó para llevar todo el pipeline a Unreal Engine 5. En un año, JMC entregaba builds en tiempo real junto a los hero films.' }, { year: '2024', title: 'IA en el pipeline.', body: 'Priya Ramanathan armó el equipo de augmentación con IA. Los pases conceptuales que tomaban una semana ahora corren en una tarde.' }, ], principles: [ ['Medido antes que ruidoso', 'La fotografía cinematográfica vive en la contención. Renderizamos a tu spec real — no a una fantasía estilizada.'], ['Un estudio, un timeline', 'Modelado, iluminación, augmentación con IA y composite — todo in-house. Nada espera en cola de un proveedor.'], ['Pixeles finales path-traced', 'La IA acelera los conceptos. Cada frame final pasa por path tracing en UE5. Sin excepciones.'], ['Ingenierizado para el largo plazo', 'La arquitectura de data centers vive décadas. Nuestras visualizaciones envejecen con el edificio.'], ], cta: { eyebrow: 'Conversemos', title: 'Dos formas de empezar.', body: 'Agendá una visita del trabajo reciente, o mandanos un brief — respondemos en un día hábil.', primary: 'Contactanos', secondary: 'Ver portfolio', }, }, contact: { hero: { eyebrow: 'Contacto', title: 'Contános sobre tu proyecto.', sub: 'Escribinos y contános sobre tu proyecto — respondemos en un día hábil con casos relevantes y una llamada de scoping.', }, side: { contactDirect: 'Contacto directo', responseTitle: 'Tiempo de respuesta', responseBody: 'Un día hábil. La mayoría de las visitas se agendan dentro de los cinco días hábiles.', }, form: { title: 'Envianos un mensaje', firstName: 'Nombre', lastName: 'Apellido', company: 'Empresa', email: 'Email', phone: 'Teléfono', interest: 'Me interesa', interestOptions: ['Hero film', 'Build tiempo real', 'Digital twin', 'Solar / BESS', 'Pre-visualización', 'Otro / No sé'], message: 'Contános sobre tu proyecto', messagePlaceholder: 'Brevemente — sector, alcance, timeline, cualquier cosa específica que quieras cubrir. Algunas líneas está bien.', optional: '(opcional)', submit: 'Enviar mensaje', sending: 'Enviando…', }, success: { eyebrow: 'Mensaje recibido', title: 'Gracias — te respondemos pronto.', body: 'Una confirmación va camino a', bodyAfter: '. Esperá una respuesta personal dentro del día hábil.', primary: 'Explorar portfolio', secondary: 'Enviar otro', nextEyebrow: 'Qué sigue', next: [ ['01', 'Confirmación', 'Email de confirmación en unos minutos.'], ['02', 'Respuesta personal', 'Dentro del día hábil, de nuestro director creativo.'], ['03', 'Llamada de 30 min', 'Walk-through del trabajo relevante y scoping de tu proyecto.'], ], }, faq: { eyebrow: 'FAQ', title: 'Preguntas frecuentes.', }, }, footer: { tagline: 'Visualización arquitectónica cinematográfica para la industria de data centers — Unreal Engine 5, aumentado con IA, ingenierizado para el largo plazo.', columns: { capabilities: 'Capacidades', portfolio: 'Portfolio', studio: 'Estudio', contact: 'Contacto', }, bottom: '© 2026 JMC Realities, Ltd. · Estudio de visualización', privacy: 'Privacidad', terms: 'Términos', cookies: 'Preferencias de cookies', }, }, }; // Language context const LangContext = React.createContext({ lang: 'en', t: TRANSLATIONS.en, setLang: () => {} }); function LangProvider({ children }) { const [lang, setLang] = React.useState(() => { return localStorage.getItem('jmc_lang') || 'en'; }); React.useEffect(() => { localStorage.setItem('jmc_lang', lang); document.documentElement.lang = lang; }, [lang]); const value = React.useMemo(() => ({ lang, t: TRANSLATIONS[lang], setLang, }), [lang]); return {children}; } const useLang = () => React.useContext(LangContext); Object.assign(window, { LangProvider, LangContext, useLang, TRANSLATIONS });