-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add sponsors translations #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ctrl-alt-d
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Me ha parecido muy bien adaptado al patrón i18n de Astro a la vez que la presentación aparece una vez y el contenido si está internacionalizado. Genial.
Sería interesante configurar el Browser language detection, tengo el Browser en ca y la página me aparece es es.
|
@itziarZG , he estado mirando como respetar el idioma del navegador del usuario. No he sabido hacerlo sin un middleware y he tenido que eliminar el prerender de Para mi gusto, la solución final sería:
(Ahora tenemos 1,3,4 no tenemos la 2) |
Add middleware to detect browser language --------- Co-authored-by: itziarZG <[email protected]>
This PR implements Internationalization (i18n) for the PyConES 2026 website, specifically focusing on the Sponsors page and landing components. It introduces support for English (en), Spanish (es), and Catalan (ca).
Key Changes
i18n Infrastructure: * Added translation files (.ts) for all sponsor-related content (tiers, benefits, testimonials, and past sponsors).
Implemented a middleware to handle automatic language detection based on the user's browser settings (Accept-Language).
Routing & Structure:
Refactored page structure to use dynamic routing: moved pages to src/pages/[lang]/.
Updated astro.config.mjs to configure the i18n routing strategy.
UI/UX Improvements:
Localized the landing page elements (Hero title, subtitle, and CTA buttons).
Updated the Layout.astro to dynamically set the lang attribute in the HTML tag for better accessibility and SEO.
Technical Cleanup:
Centralized text constants to improve maintainability.
Refactored the main index and sponsors pages to consume translated strings via a helper.
Languages Added:
Spanish es
English en
Catalan ca