-
Book Overview & Buying
-
Table Of Contents
Django 1.0 Template Development
Internationalization can be used to offer your site in multiple languages from a single project. Instead of creating multiple domains, projects, or templates, you can provide translation strings in your templates that allow for the appropriate language file to be chosen.
One important thing to keep in mind is that the database content is not stored in multiple versions. It is presented to the user in the same way regardless of language. Saving multiple translations of content can be done, but it isn't something than can easily be done inside templates and so it's beyond the scope of this book.
When a user first views the site, an HTTP header called Accept-Language will identify his or her language preference. If it's not specified, Django will look at your project's settings file and see what the default language to serve is. You can also provide links to set cookies that Django will look for to determine the language preference.
In order to use i18n, we will have to tell...
Change the font size
Change margin width
Change background colour