Tuesday, April 22, 2008

This Week in Django 19

with hosts Michael Trier and Brian Rosner

Bookmark and Share

This Week in Django is a weekly podcast about all things Django.

SPECIAL FEATURE – Internationalisation

This is the first part of a two part series on Internationalisation. This week we are privileged to talk to Malcolm Tredinnick, Django core developer. Malcolm educates us on what internationalisation is all about, how it is implemented in Django, and some of the areas that can be improved in the future.

Additionally, we also discuss a lot of changesets in the Queryset Refactor Branch, and a couple of blog posts from the Django community.

It is our longest show yet, but definitely worth your attention. This is a must listen podcast.

Please see the Show Notes below for all the pertinent information and links

Downloads

AAC Enhanced Podcast (79.3 MB, 1:41:32, AAC)

MP3 Edition (69.8 MB, 1:41:32, MP3)

OGG Edition (56.8 MB, 1:41:32, Vorbis)

The Enhanced Podcast version contains screenshots and easy access links to all of the items we discuss throughout the podcast.

Feeds Available

iTunes Feeds are available. By subscribing using the iTunes feeds the podcasts will automatically be downloaded for you when we release them.

iTunes Feeds

This Week in Django – AAC Edition

This Week in Django – MP3 Edition

Regular RSS Feeds

This Week in Django – AAC Edition

This Week in Django – MP3 Edition

This Week in Django – OGG Edition

Give Us Feedback

Want to give us some feedback on the show? We’re always looking for ideas or suggestions that will help improve each episode. Please contact us at feedback <i>at</i> thisweekindjango.com.

Show Notes

Special Feature – Internationalization (1:39)

Malcolm Tredinnick, Django core developer, joins us to discuss internationalisation. Malcolm has often played the role of expert on internationalization / localization issues, speaks several languages, and works closely with the Django translators.

To learn more about Malcolm Tredinnick, be sure to add his blog, Defying Classification, to your RSS feeds and listen to our interview with Malcolm on This Week in Django 13

  • What is the difference between internationalisation and localisation?
  • Python 3.0 will feature full unicode support. What does that mean for Django? Will there be any benefits?
  • I attended a discussion by Tim Bray, who I suppose is a recognized internationalisation expert, and by the end of the discussion I felt like the idea of creating truly internationlised applications is somewhat hopeless. What are your thoughts about this?
  • How does translation support appear to the end-user in something like Django? (how they set which language to use, what Django does, etc).
  • Justin Lilly, a Django user and rabid fan of the show, wanted to ask, “I’m curious how many different ways there are to declare gettext-like things.. ugettext, gettext, (as a commonly used alias).. any more I don’t know?” So what about it? What’s the differences?
  • What is the difference between unicode and utf-8? Is there a difference?
  • What sort of things do developers need to watch out for when writing code for an international audience?
  • What can we do to improve the support in third-party applications for Internationalisation?
    • People learn differently so maybe we need to explore as many ways as possible to educate people. We can use things like tutorials or screencasts.
    • James Bennett’s apps are internationalised.
  • Goal is to get Django to pass the Turkey test yet, but it’s a goal.
  • How do you handle sorting in Django?

Tracking Trunk (59:37)

  • Updated Markdown Filter to Support v1.7 (7423) – From the mailing list, “Additionally, the encoding argument has been removed from both markdown and Markdown. Markdown expects unicode (or ascii) input and it is the users responsibility to ensure that’s what is provided. Therefore, all output is in unicode. Only markdownFromFile accepts an encoding.”

Branching & Merging (1:01:57)

Community Catchup (1:24:12)

  • The limits of Django – Interesting post by Alberto García Hierro where he discusses the process he used to optimize queries. His final solution ended up being a C library. The post received tons of interest and he provided a followup, The limits of Django: the answers, where he addresses some of the questions he received.

Thank You! (1:38:43)

Comments - 12 people have already said something. Join the discussion.

  • BDP said

    The current post, at least in the MP3 feed (as it appeared recently in my Google reader), refers to episode 19 but links to the episode 18 audio file.

  • Jannis Leidel said

    You guys simply rock!

  • yml said

    Hello,
    Thank you very much for the shows. I would like two projects that I found very useful or promising :
    * The first project is django-multilingual [1] ; it will allow you to build a multilingual web site. It will transparently store content in multiple languages for set fields inside Django models. This is unlike Django i18n which is a translation system used for static content. As an example you can imagine a multilingual flatpage application where you could store in database the content of a page in French, Engish, Spanish.

    * The second is django-rosetta ; it will allow you to translate your django applications over the web.

    Here it is my 2 cents on the topics.
    --yml

    [1] http://code.google.com/p/django-multilingual/
    [2] http://code.google.com/p/django-rosetta/

  • yml said

    It is also interesting to note that "make-message.py" only extract string from file with the following extension : ".js", ".html", ".py"
    For example if your django template has a different extension than ".html', like ".txt" or ".csv", the strings will not be extracted.
    --yml

  • kevin said

    you realize you now need to post this podcast in several different languages ;)

  • kevin said

    just curious, in regards to model inheritance, Malcolm was about to touch upon "projecting a field onto another model" but then seemed to back way from this discussion.

    what would work, if django supported it, would be partials. essentially the partial is "merged" at runtime with the "parent" class.

    so in this instance you'd have a Person:partial class where you keep your additional properties, methods, etc. Than instead of subclassing, this is essentially an "extension" of the original base class without subclassing.

  • Empty said

    BDP: thanks, I messed that up. yml: Malcolm mentioned that limitation. kevin: good luck. :)

  • sean said

    thanks~
    really good work

  • David Reynolds said

    Great podcast as ever. It's good to hear such a big topic explained on a podcast.

  • kfz-versicherung said

    Nice!

  • Meir Kriheli said

    One thing you didn't mention in the cast (or Malcolm in his post regarding it) is the issue of BiDi/RTL, i.e: languages that are written from right to left.

    Usage examples can be found in the patches for the admin interface enabling it to work from right to left.

    If you'd like more info about the issues regarding RTL and web apps for the next cast, contact me via email.

  • Doug said

    On the question of locale specific sorting in the database, Oracle provides a way to do this that isn't table specific -- you do something like this:

    SELECT *
    FROM test2
    WHERE lang = 'de'
    ORDER BY NLSSORT(name, 'NLS_SORT=german');

    In this example, the table test2 could contain information in many different languages and you could choose to select only the German content and order in a way that makes sense in German.

    The linguistic sort is part of the locale definition.

    It looks like something similar can be done in MySQL:

    SELECT k
    FROM t1
    ORDER BY k (COLLATE latin1_german2_ci;
    http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html