Skip to content

Conversation

@Proxyfil
Copy link
Owner

@Proxyfil Proxyfil commented Nov 5, 2025

This pull request introduces internationalization (i18n) support to the blog components, enabling dynamic language selection (English and French) for blog post content, UI labels, and accessibility attributes. The changes also refactor how blog post data is loaded based on the current language, and update various components to use translation utilities for improved localization.

Internationalization and Localization Enhancements:

  • Added the i18n package as a dependency in package.json to support translations.
  • Introduced getLangFromUrl and useTranslations utilities in multiple components (e.g., DatePub.astro, Hero.astro, Languages.astro, LastPost.astro, ListPosts.astro, Tags.astro, Footer.astro, Header.astro, NavArticle.astro) to detect the current language and fetch appropriate translations for UI text and accessibility labels. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated labels and button text throughout the UI to use translation keys instead of hardcoded English strings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Dynamic Content Loading Based on Language:

  • Refactored blog post listing components (Languages.astro, LastPost.astro, ListPosts.astro, Tags.astro) to load posts from the appropriate language-specific directory (en or fr) depending on the current language. [1] [2] [3] [4]

UI and Accessibility Improvements:

  • Updated aria-label attributes and navigation links to use translated text, improving accessibility for multilingual users. [1] [2] [3] [4] [5] [6]
  • Added a LanguagePicker component to the header for user language selection. [1] [2]

Other Minor Updates:

  • Updated .astro/data-store.json and .astro/settings.json to reflect the latest build and configuration state. [1] [2]

These changes collectively enable a more flexible, accessible, and user-friendly multilingual experience across the blog.

@Proxyfil Proxyfil self-assigned this Nov 5, 2025
@Proxyfil Proxyfil closed this Nov 5, 2025
@Proxyfil Proxyfil deleted the chore/minecraft-kubernetes branch November 5, 2025 09:11
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