Add Translation support#36
Open
Manu-Devloo wants to merge 6 commits into
Open
Conversation
…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.
…and English translations" This reverts commit 1fe099a.
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@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. |
…chedule settings dialog" This reverts commit 8157208.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
src/i18n/, with helpers inutils.tsfor loading and using translations.LanguageSelector.astrocomponent, allowing users to switch languages via a dropdown, with keyboard navigation and accessibility features.Page.astro,ThemePicker.astro,Dialog.astro,AboutDialog.astro, andCards.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
astro.config.mjsto enable Astro's i18n routing, specifying supported locales and default language.README.mdwith detailed instructions for adding new languages, translation file structure, and usage of the language selector.Development and Miscellaneous
package.jsonfor clarity and maintainability.These changes collectively make Instabart accessible to a wider audience and simplify the process of contributing new languages.