Gettext .po Bundle-Time Compilation — Zero Runtime Parsing
Internationalizing a modern web application often forces developers into an uncomfortable compromise. Either you sign up for an expensive third-party translation management SaaS that introduces external network dependencies, or you load heavy client-side parsing libraries that process localization files dynamically in the browser, degrading performance.
In this portfolio, which supports four languages (English, Spanish, German, and Italian), I chose an architecture that eliminates both drawbacks: authoring localization in industry-standard GNU gettext `.po` catalogs, and compiling them into lean, tree-shakable JSON modules at bundle time using a custom Vite plugin.
GNU gettext has been the gold standard of internationalization in Unix and open-source software for over three decades. Unlike nested JSON dictionaries that force developers to invent synthetic keys (such as `common.header.nav.aboutMe`), gettext uses natural language source strings directly as translation identifiers (`msgid "About Me"`) paired with localized translations (`msgstr "Sobre Mí"`).