feat: Added i18n to project and translated in french #11
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 internationalization (i18n) support for the blog, enabling dynamic language selection (English and French) across key blog components. It refactors how blog posts are loaded and displayed based on the selected language, and updates user-facing text to use translation utilities, improving accessibility and user experience for multilingual audiences.
Internationalization and Language Selection
i18npackage to dependencies and integratedgetLangFromUrlanduseTranslationsutilities in all main blog and layout components to determine and use the current language from the URL. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Dynamic Loading of Blog Content by Language
ListPosts.astro,LastPost.astro,Languages.astro,Tags.astro) to dynamically load posts from either the English or French directories based on the current language. [1] [2] [3] [4]Translation of User-Facing Text
t(...)) throughout blog, header, footer, and navigation components for improved localization. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Language-Aware Routing and Navigation
Locale-Aware Date Formatting
DatePub.astroto use the appropriate locale (fr-FRoren-US) based on the selected language, ensuring dates are displayed in the correct format for each audience.These changes collectively provide a solid foundation for a multilingual blog experience, making the site more accessible and user-friendly for both French and English readers.