AquaSeal ships with English, Urdu, Hindi, and Hinglish strings. This guide explains how to contribute new languages or update existing translations.
- Text resources are defined inside
www/script.jsin a map similar to:const SUPPORTED_LANGUAGES = { en: {...}, ur: {...}, hi: {...}, hn: {...} };
- Each entry mirrors the default English keys. UI components look up strings through helper functions so the DOM updates instantly.
- Pick a language code (ISO 639-1 preferred) and add it to
SUPPORTED_LANGUAGES. - Provide translations for all keys. Missing keys fall back to English; avoid partial translations.
- Add a button/option to the language picker so users can activate the new locale.
- Test flows:
- Navigation tabs (Home, Downloads)
- Toasts and confirm dialogs
- Button labels (Download, Clear, Open)
- Error states from native plugins
- Use the HTML
dirattribute when switching to RTL languages. - Ensure CSS accommodates RTL text (flex direction, margins, icons).
- The current build adjusts body classes; reuse that logic for new RTL locales.
- Keep strings human-friendly. For complex plural rules, consider moving to message-format libraries.
- Dates in the Downloads page rely on
toLocaleString. Pass the selected language so dates reflect the active locale.
- Use the built-in language switcher to live-preview translations.
- Run the app on devices/emulators that match the locale to verify fonts/rendering.
- For languages needing custom fonts, add them to
www/style.cssand load conditionally.
- Small fixes: open a pull request editing
www/script.js. - Large additions: create an issue to coordinate terminology and reviewers.
- Please include screenshots showing the UI with your translations applied.