Skip to content

Conversation

@Proxyfil
Copy link
Owner

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

  • Added the i18n package to dependencies and integrated getLangFromUrl and useTranslations utilities 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

  • Updated all blog post listings (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

  • Replaced hardcoded strings (e.g., button texts, aria-labels, headings) with translation function calls (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

  • Updated navigation links and routing (e.g., "About Me", "View all posts") to include the current language in URLs, ensuring consistent navigation for both English and French users. [1] [2]

Locale-Aware Date Formatting

  • Modified the date formatting in DatePub.astro to use the appropriate locale (fr-FR or en-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.

@Proxyfil Proxyfil self-assigned this Oct 26, 2025
@Proxyfil Proxyfil merged commit cc51ec6 into main Oct 26, 2025
1 check passed
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.

2 participants