Multi-language support with real-time updates, multi-layer caching, and comprehensive management
The HelixTrack Localization system is a dedicated microservice that provides centralized, scalable internationalization (i18n) for all HelixTrack applications. It uses HTTP/3 QUIC for optimal performance, PostgreSQL with SQL Cipher encryption for data storage, and multi-layer caching for lightning-fast translations.
Support for English, German, French, Spanish, Portuguese, Russian, Chinese, Japanese, Arabic (RTL), and Hebrew (RTL)
WebSocket integration for instant translation updates across all clients without page refresh
In-memory LRU cache + localStorage/Redis for optimal performance and reduced database load
Automatic version tracking with cache invalidation ensures clients always have the latest translations
PostgreSQL with SQL Cipher encryption protects your localization data at rest
Dynamic content with {variable} placeholders for personalized messages
localStorage Cache: 1-hour TTL, automatic versioning
WebSocket Connection: Real-time update notifications
Fallback: Automatic fallback to default language (en)
Port: 8085-8095 (auto-selection)
Protocol: HTTP/3 with TLS 1.3
In-Memory Cache: LRU cache for frequently accessed translations
Redis Cache: Optional distributed cache layer
Tables: 6 (languages, localization_keys, localizations, etc.)
Encryption: SQL Cipher for data at rest
Seed Data: Automatic population from JSON files on startup
Full integration with WebSocket, caching, and automatic updates
Native integration with offline support and sync
Native Android integration with HTTP/3 via Cronet
Native iOS integration with URLSession HTTP/3
Error message localization and response formatting
Comprehensive management interface for translations
// Inject the localization service constructor(private l10n: LocalizationService) {} // Load catalog for a language await this.l10n.loadCatalog('en'); // Translate a key const message = this.l10n.t('error.invalid_request'); // Translate with variable interpolation const greeting = this.l10n.t('app.welcome_user', { name: 'John' }); // Returns: "Welcome, John!" // Batch translation const messages = this.l10n.translateBatch([ 'error.success', 'common.ok', 'common.cancel' ]); // Change language (triggers catalog reload) await this.l10n.setLanguage('de'); // WebSocket events are automatically handled // Catalog updates trigger cache refresh
// Fetch complete catalog catalog, err := locService.GetCatalog(ctx, "en") // Translate single key message, err := locService.Localize(ctx, "error.invalid_request", "en") // Batch translation keys := []string{"error.success", "common.ok"} messages, err := locService.LocalizeBatch(ctx, keys, "en") // Create localized error response response := models.NewLocalizedErrorResponse( models.ErrorCodeInvalidRequest, "en", localizedMessage, ) // Response includes both default and localized error messages
// Initialize HTTP/3 client with Cronet val engine = CronetEngine.Builder(context) .enableHttp3(true) .build() // Fetch localization catalog val request = UrlRequest.Builder( "https://localization:8085/v1/catalog/en", callback, executor, engine ).build() request.start() // Handle response with translations override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo) { val catalog = parseCatalog(responseData) cacheManager.saveCatalog(catalog) }
# Health check GET /health # Get complete catalog for a language GET /v1/catalog/:language # Get single localization GET /v1/localize/:key?language=en # Batch localization POST /v1/localize/batch { "keys": ["error.success", "common.ok"], "language": "en" } # List all languages GET /v1/languages
# Language Management POST /v1/admin/languages # Create language PUT /v1/admin/languages/:id # Update language DELETE /v1/admin/languages/:id # Delete language # Localization Management POST /v1/admin/localizations # Create/update localization POST /v1/admin/import # Import (JSON, CSV, XLIFF) GET /v1/admin/export # Export (JSON, CSV, XLIFF) # Statistics GET /v1/admin/stats # Get service statistics
// Connect to WebSocket ws://localization:8085/ws // Event types received: - catalog_updated // Catalog version changed - localization_created // New translation added - localization_updated // Translation modified - localization_deleted // Translation removed - language_created // New language added - language_updated // Language updated - language_deleted // Language removed - batch_operation_completed // Batch import/update done
The system includes 79+ localization keys organized into 8 categories:
Complete error code mapping from Core backend (ErrorCodeInvalidRequest, ErrorCodeMissingJWT, etc.)
Shared UI elements (OK, Cancel, Save, Delete, Confirm, etc.)
Navigation menu items (Dashboard, Projects, Tickets, Settings, etc.)
Login, logout, registration, password reset messages
Dashboard-specific strings (widgets, charts, summaries)
Project management strings (create, update, archive)
Ticket-related strings (create, assign, comment, close)
Settings and preferences strings
The Web Client includes a comprehensive admin module for managing localizations:
# Populate database from seed data (JSON files) ./seed-data/populate-from-seed.sh # Export database to seed format (for backups) ./seed-data/export-to-seed.sh # Periodic automated backups ./seed-data/periodic-backup.sh # Backups saved to: backups/hourly/, backups/daily/, backups/weekly/
# Start Localization service with Docker Compose cd Core/Services/Localization docker-compose up -d # Services started: # - Localization Service (port 8085, HTTP/3 QUIC) # - PostgreSQL (port 5432) # - Redis (optional, port 6379) # Check service health curl https://localhost:8085/health # View logs docker-compose logs -f localization
{
"server": {
"port": 8085,
"https": true,
"cert_file": "/path/to/cert.pem",
"key_file": "/path/to/key.pem"
},
"database": {
"type": "postgresql",
"host": "localhost",
"port": 5432,
"name": "localization_db",
"user": "localization_user",
"cipher_key": "your-encryption-key"
},
"cache": {
"redis_enabled": true,
"redis_address": "localhost:6379",
"memory_cache_size": 1000
},
"seed_data": {
"auto_populate": true,
"seed_directory": "./seed-data"
}
}
Explore the complete documentation and start using the Localization system today
User Manual Client Integration Guide