Skip to content

Add Translation support#36

Open
Manu-Devloo wants to merge 6 commits into
mortnod:mainfrom
Manu-Devloo:main
Open

Add Translation support#36
Manu-Devloo wants to merge 6 commits into
mortnod:mainfrom
Manu-Devloo:main

Conversation

@Manu-Devloo
Copy link
Copy Markdown

This pull request introduces full internationalization (i18n) support, enabling Instabart to serve content in multiple languages (English, Norwegian Bokmål, and Dutch). The changes include a new file-based translation system, a user-friendly language selector component, updates to Astro configuration for language routing, and refactoring of UI components to use translation keys. The documentation has also been updated to guide contributors on adding new languages.

Internationalization Features

  • Added file-based i18n system: translations are now stored in per-language JSON files in src/i18n/, with helpers in utils.ts for loading and using translations.
  • Implemented a new LanguageSelector.astro component, allowing users to switch languages via a dropdown, with keyboard navigation and accessibility features.
  • Refactored major UI components (Page.astro, ThemePicker.astro, Dialog.astro, AboutDialog.astro, and Cards.astro) to use translation keys from the i18n system instead of hardcoded strings, ensuring all user-facing text is translatable. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Configuration and Documentation

  • Updated astro.config.mjs to enable Astro's i18n routing, specifying supported locales and default language.
  • Expanded the README.md with detailed instructions for adding new languages, translation file structure, and usage of the language selector.

Development and Miscellaneous

  • Minor code improvements and dependency reorganization in package.json for clarity and maintainability.
  • Small bugfixes and code tidying in analytics and dialog components. [1] [2]

These changes collectively make Instabart accessible to a wider audience and simplify the process of contributing new languages.

…ish translations

- Added translation files for Norwegian (no.json) and English (en.json).
- Created utility functions for language detection and translation loading in i18n.ts.
- Integrated language selection in the footer with a LanguagePicker component.
- Updated content components (Header, Footer, AboutDialog, Cards, ScheduleCard, ScheduleSettingsDialog) to use translations.
- Implemented placeholder replacement for dynamic content in translations.
- Added documentation for internationalization setup and usage in INTERNATIONALIZATION.md.
- Added language selector component to allow users to switch between languages.
- Integrated translation functionality across various components and pages.
- Updated existing components to utilize translations for static text.
- Created JSON files for English, Norwegian, and Dutch translations.
- Refactored code to dynamically load translations based on the selected language.
- Enhanced accessibility by ensuring language selector is keyboard navigable.
- Updated meta descriptions and other text elements to use translations.
@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
instabart Ready Ready Preview Comment Aug 15, 2025 3:49pm

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 15, 2025

@Manu-Devloo is attempting to deploy a commit to the Morten Noddeland's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant