Posts tagged with i18n
If you use a language that's a bit more complex than English (or most western languages, that is), you'll probably have some problems displaying dates that actually don't look like computer-generated.
Django-localdates deals with this problem, and tries to tackle the general problem of internationalizing dates.
django-localdates is a django app that brings local date presentation to django, by providing custom date filters that can use local-flavored format strings.
Following up to the part 3 of my series about implementing a multilingual interface for this blog, I now present the things to make the language-magic happen: Middleware and context processors.
As I wrote in the two previous posts, I wanted the URLs of this site to contain the language the content is in. To do this, I had to write some custom code, including models, managers, middleware and context processors.
Designing URLs for international content can be tricky. I explore the possibilities and use cases, and a clear pattern emerges.
From the start, I was interested in making the content posted here available in two languages: Greek and English. This is no small feat, and I thought long and hard on how to make it possible and get it working just the way I like it. So here is a rundown of how internationalization works on this blog.