Contributing Translations¶
LANCache Manager supports internationalization (i18n) and welcomes community translations. The UI reads its strings from the locale files in Web/src/i18n/locales/.
How to contribute¶
- Fork the repository on GitHub.
- Open
Web/src/i18n/locales/. - Copy
en.jsonto a file named for your language (e.g.,de.json,fr.json,es.json,pt-BR.json). - Translate the values. Leave the keys alone.
- Register the language - import your file and add it to
resourcesandsupportedLngsinWeb/src/i18n/index.ts, then add its label toLANGUAGE_LABELSinWeb/src/components/common/LanguageSelector.tsx. Without this step the app never reads your file. - Submit a pull request.
File layout¶
Web/src/i18n/locales/
├── en.json ← English (reference)
├── de.json ← German (your contribution)
├── fr.json ← French (your contribution)
└── ...
Guidelines¶
- Don't change JSON keys - only translate the string values.
- Preserve placeholders - keep
{{variable}}intact (e.g.,{{name}}). - Preserve formatting - leave HTML tags like
<strong>alone. - Test locally - run the app and verify your translations render correctly.
Example¶
// simplified illustration - the real keys live in en.json
{
"dashboard": {
"title": "Dashboard",
"recentDownloads": "Recent Downloads",
"totalCache": "Total Cache: {{size}}"
}
}
// your translation (de.json)
{
"dashboard": {
"title": "Übersicht",
"recentDownloads": "Letzte Downloads",
"totalCache": "Gesamter Cache: {{size}}"
}
}