Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Django 1.0 Template Development
  • Table Of Contents Toc
Django 1.0 Template Development

Django 1.0 Template Development

4 (2)
close
close
Django 1.0 Template Development

Django 1.0 Template Development

4 (2)

Overview of this book

Table of Contents (17 chapters)
close
close
Django 1.0 Template Development
Credits
About the Author
About the Reviewers
Preface
1
Index

Exploring i18n


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.

Note

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...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Django 1.0 Template Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon