Add English language support with i18n implementation
Implemented comprehensive internationalization (i18n) for both frontend and backend: Frontend: - Added react-i18next configuration with Spanish (default) and English - Created translation files (locales/es.json, locales/en.json) - Refactored core components to use i18n: LoginPage, DashboardHeader, DataUploader - Created LanguageSelector component with toggle between ES/EN - Updated API client to send Accept-Language header Backend: - Created i18n module with translation dictionary for error messages - Updated security.py to return localized authentication errors - Updated api/analysis.py to return localized validation errors - Implemented language detection from Accept-Language header Spanish remains the default language ensuring backward compatibility. Users can switch between languages using the language selector in the dashboard header. https://claude.ai/code/session_1N9VX
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// utils/apiClient.ts
|
||||
import type { TierKey } from '../types';
|
||||
import i18n from '../i18n';
|
||||
|
||||
type SegmentMapping = {
|
||||
high_value_queues: string[];
|
||||
@@ -85,6 +86,7 @@ export async function callAnalysisApiRaw(params: {
|
||||
body: formData,
|
||||
headers: {
|
||||
...authHeaders,
|
||||
'Accept-Language': i18n.language || 'es',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user