Functional overview
Figure 11.1 shows a representation of the views, templates, and functionalities that will be built in this chapter:
Figure 11.1: Diagram of the functionalities built in Chapter 11
In this chapter, you will implement internationalization in your project and translate templates, URLs, and models. You will add language selection links to the header of your site and create language-specific URLs. You will modify the product_list
and product_detail
views of the shop
application to retrieve Category
and Product
objects by their translated slugs. You will also add a localized postal code field to the form used in the order_create
view.
The source code for this chapter can be found at https://github.com/PacktPublishing/Django-5-by-example/tree/main/Chapter11.
All the Python modules used in this chapter are included in the requirements.txt
file in the source code that comes with this chapter. You can follow the instructions to install each Python module...