~/talk

Becoming a Multilingual SuperHero in Django

Talkat DjangoCon US 2018 · 2018-10-14..10-19· [django]
slides:none on file

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

  1. 0:00Start
  2. 1:27Enable Translation
  3. 5:07Prefix Default Language
  4. 5:30Gotchas
  5. 8:03Loading the Internationalization I18n Tag
  6. 8:25Internationalization and Localization
  7. 9:26How To Support Translations in all Dot Py Files
  8. 11:41Translation Files
  9. 15:12Compile these Static String Translations
  10. 16:26Dynamic String Translations
  11. 17:28Django Model Translation Package
  12. 18:37Bonus Tips and Tricks for Internationalization and Debugging Translation Issues
  13. 19:58Translate Url
  14. 20:19What Happens When You Switch Language in Templates
  15. 21:04How Do You Support Multiple Languages in Templates
  16. 22:45Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.