Becoming a Multilingual SuperHero in Django
summary
Claim is that a Django/DRF app and admin can serve localized APIs and CMS content for Chinese (and others) end to end; implementation uses Django i18n middleware, URL i18n_patterns, Accept‑Language header, locale folders and generated .po/.mo files via makemessages/compilemessages, and dynamic translations via django-modeltranslation or external services like Transifex. Practical gotchas are locale codes (zh_CN vs zh‑cn), virtualenv placement breaking message commands, needing to restart the server, and propagating language to Celery tasks; the setup works after these fixes.
AI-written summary · about
chapters (16)
- 0:00Start
- 1:27Enable Translation
- 5:07Prefix Default Language
- 5:30Gotchas
- 8:03Loading the Internationalization I18n Tag
- 8:25Internationalization and Localization
- 9:26How To Support Translations in all Dot Py Files
- 11:41Translation Files
- 15:12Compile these Static String Translations
- 16:26Dynamic String Translations
- 17:28Django Model Translation Package
- 18:37Bonus Tips and Tricks for Internationalization and Debugging Translation Issues
- 19:58Translate Url
- 20:19What Happens When You Switch Language in Templates
- 21:04How Do You Support Multiple Languages in Templates
- 22:45Conclusion
related talks
27mBeyond Po: How to Make Django Work...
01h 39mTUTORIAL: Parlez-vous Wagtail? Internalization for Python/Django developers
29mPushing The Pony's Boundaries - Django Admin Customization
22mSpicing up Django: An Introduction to Mezzanine CMS
23mLessons Learned in a Large Django Project
53mDjango productivity tips and tricks
29mScaling Django to 500 apps
53mDjango productivity tips and tricks
