11

Adding Internationalization to Your Shop

In the previous chapter, you added a coupon system to your shop and built a product recommendation engine.

In this chapter, you will learn how internationalization and localization work.

This chapter will cover the following points:

  • Preparing your project for internationalization
  • Managing translation files
  • Translating Python code
  • Translating templates
  • Using Rosetta to manage translations
  • Translating URL patterns and using a language prefix in URLs
  • Allowing users to switch language
  • Translating models using django-parler
  • Using translations with the ORM
  • Adapting views to use translations
  • Using localized form fields of django-localflavor

The source code for this chapter can be found at https://github.com/PacktPublishing/Django-4-by-example/tree/main/Chapter11 ...

Get Django 4 By Example - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.