⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@itziarZG
Copy link
Collaborator

@itziarZG itziarZG commented Jan 27, 2026

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

@itziarZG itziarZG marked this pull request as ready for review January 27, 2026 22:15
Copy link
Collaborator

@ctrl-alt-d ctrl-alt-d left a 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.

@ctrl-alt-d
Copy link
Collaborator

@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 /. Lo verás en #49. Quizá tú conozcas alguna solución más limpia.

Para mi gusto, la solución final sería:

Prioridad Fuente de idioma Ejemplo Quién lo controla
1 URL (/es/, /en/) /es/blog/ Routing / SEO
2 Cookie (pycon_language) pycon_language=es Usuario desde menú cambio idioma
3 Navegador (Accept-Language) es-ES,es;q=0.9,en;q=0.8 Navegador
4 Default (DEFAULT_LANG) en Configuración

(Ahora tenemos 1,3,4 no tenemos la 2)

ctrl-alt-d and others added 3 commits January 28, 2026 19:12
@itziarZG itziarZG requested a review from francescarpi January 28, 2026 18:40
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.

3 participants