# Multi-Language Support with Icon-Based UI ## Overview Add Hindi, English, Tamil, and Telugu language support to BharathTrucks with large icon-based buttons designed for low-literacy users. ## Requirements 1. Support 4 languages: Hindi (default), English, Tamil, Telugu 2. Language switcher in header — persisted in session 3. All navigation and action buttons use large icons with minimal text labels 4. Bottom nav and dashboard buttons are icon-first (large emoji/SVG + short label) 5. Low-literacy friendly: icons convey meaning without reading ## Technical Design ### i18n Approach - Simple JSON translation files in `src/i18n/{lang}.json` - Middleware reads `req.session.lang` (default: `hi`) and attaches `t()` helper to `res.locals` - No external i18n library needed — lightweight custom implementation ### Language Switcher - `GET /lang/:code` route sets `req.session.lang` and redirects back - Header shows 4 flag/label buttons: हिंदी | EN | தமிழ் | తెలుగు ### Icon-Based UI for Low-Literacy Users - Bottom nav: larger icons (40px), short label below - Dashboard action buttons: icon-button class with 48px emoji + label - All key actions identifiable by icon alone (🚛 truck, 📋 loads, 💰 money, etc.) ## Files Changed - `src/i18n/hi.json` — Hindi translations - `src/i18n/en.json` — English translations - `src/i18n/ta.json` — Tamil translations - `src/i18n/te.json` — Telugu translations - `src/middleware/i18n.js` — language detection middleware - `src/server.js` — add i18n middleware + `/lang/:code` route - `src/views/partials/header.ejs` — language switcher - `src/views/partials/bottom-nav.ejs` — icon-first nav - `src/views/pages/driver-dashboard.ejs` — icon-based action buttons - `src/public/css/govt-theme.css` — icon-button styles ## Testing - Switch language via header buttons, verify all labels change - Verify icons are large and clear on mobile - Verify session persists language across page navigations