Friday, January 1, 2016

Django i18n design rationale

I've worked with Django for the past few months. While this - I realize - is not much, so far it has been an extremely pleasant experience. Everything seems to be designed just right and works really nicely out of the box.

So I was that much more surprised when I had to prepare my first app for localization. It's not like anything didn't work - it did - it just didn't FEEL right to me. So in light of everythin else being just right, I'd like to ask the community to set me straight on a few points that I'm having issues with:

1. Expressions gathering vs declaring: Django has utilities to gather expressions from sources, txt files and also javascript files. While that by itself is a design choice, it also presents us with problems such as (possibly very) long expression keys, random .po file layout, etc. Are there any serious advantages that favor this approach vs declarative one?

2. What's the point of .po / .mo files? Their structure is not really far from standard Python code, so why all the work with compilation?

3. Why (except for reducing expression count) does javascript code have to be gathered in a special domain? Shouldn't that be up to me to decide whether to stick all expressions into one big file or split them up?

LP,
Jure

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/159a7905-149b-42da-930b-83371dc62988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment