Localizing a Django app into 7... Note

Localizing a Django app into 7 languages — RTL, a JS game, and the honest parts

The author localized a large Django app into seven languages as a solo developer to expand its reach. This decision was driven by the desire to make free learning content accessible to a global audience and to increase the site's search engine indexability. A key architectural decision was separating UI "chrome" (buttons, labels) from long-form content. UI elements utilized Django's gettext system, while content lessons were stored as per-language Markdown files with English as the fallback. Core domain terms were intentionally kept in English to maintain consistency and alignment with professional standards.Significant technical challenges included handling Right-to-Left (RTL) layouts, which required implementing CSS logical properties for seamless mirroring. Another issue was the discrepancy between Django's language tags (e.g., zh-hans) and content directory naming conventions (e.g., zh). Integrating JavaScript translation involved using Django's djangojs catalog for dynamic UI strings. A robust content loader was crucial to ensure that partially translated languages gracefully defaulted to English content instead of producing 404 errors. Automated parity tests were implemented to guarantee that translated files maintained the same structural integrity as their English counterparts. Finally, the system determines visitor language preferences based on IP country or user settings, with an explicit switcher overriding defaults. The author openly acknowledged that non-English translations were AI-assisted drafts undergoing review. This disciplined approach enabled successful localization across multiple languages by a single developer.