Internationalization (i18n) for web app and API, with Catalan as default #18

Open
opened 2026-09-23 21:51:44 +00:00 by NotS1mp · 0 comments
Owner

Summary

Both the web app and the API are currently single-language. They should support multiple languages, with Catalan (ca) as the primary/default language, given the .cat domain.

Expected behavior

Web app

  • All UI strings extracted into translation files (no hardcoded text).
  • Initial languages: Catalan (default), Spanish and English.
  • Language selector in the UI (could live in the settings section, #15). The choice is persisted per user and synced across devices.
  • If the user has not picked a language, detect it from the browser (Accept-Language) and fall back to Catalan.
  • Dates, numbers and durations formatted according to the selected locale.

API

  • API error and validation messages, emails and notifications are localized.
  • Language resolved from the user's saved preference or the Accept-Language header, falling back to Catalan.
  • Machine-readable error codes kept stable across languages so the frontend does not depend on message text.

Considerations

  • Use a standard i18n library for both frontend and backend.
  • Missing translation keys should fall back to Catalan and be easy to detect (e.g. logged in development).
  • Set the lang attribute on the HTML document and consider localized routes/metadata for SEO.
## Summary Both the web app and the API are currently single-language. They should support multiple languages, with **Catalan (`ca`) as the primary/default language**, given the `.cat` domain. ## Expected behavior ### Web app - All UI strings extracted into translation files (no hardcoded text). - Initial languages: Catalan (default), Spanish and English. - Language selector in the UI (could live in the settings section, #15). The choice is persisted per user and synced across devices. - If the user has not picked a language, detect it from the browser (`Accept-Language`) and fall back to Catalan. - Dates, numbers and durations formatted according to the selected locale. ### API - API error and validation messages, emails and notifications are localized. - Language resolved from the user's saved preference or the `Accept-Language` header, falling back to Catalan. - Machine-readable error codes kept stable across languages so the frontend does not depend on message text. ## Considerations - Use a standard i18n library for both frontend and backend. - Missing translation keys should fall back to Catalan and be easy to detect (e.g. logged in development). - Set the `lang` attribute on the HTML document and consider localized routes/metadata for SEO.
NotS1mp added the Kind/Feature
Priority
Medium
3
labels 2026-09-23 21:51:44 +00:00
Sign in to join this conversation.