Thanks for this excellent post. As you say, Open edX doesn't provide great support in this area as yet, and it is a very important area. We are creating a new team here at edX to work on i18n issues (lead by Bill DeRusha) so now is a great time to agree as a community on how to move forward.
I think your suggestion of starting with XBlocks is a good one, and would be a simple place to start. However, as you say, the blocks need to be moved out of the platform which complicates matters. It also seems problematic that every single block needs to become locale aware. I have a couple of ways to approach this that are more general in nature, but which are obviously bigger in scope.
My first idea to consider is to provide a new container block that conditionally renders different children based upon the user's locale. We already have a container block that hasn't been made available on
edx.org, but which allows child blocks to be shown conditionally based upon certain criteria (mostly successful completion of problems at this point). We could either extend that block, or provide a new i18n-specific block that is better suited to that purpose (IMO the latter is the better option).
My second idea is to use cohorted courseware which already provides a great way to handle conditional content. The challenge with this is that you'd have to put users into cohorts based upon their locale, which seems complicated. However, the UI for cohorted content is much cleaner than the conditional block, in that you can click on the "eye" icon on any block and change who it is displayed to. Maybe this could be extended to work both for cohorts and for locales. You could then imagine that the block could be shown with a flag indicating that it is only shown for a particular locale. A variant of this would be to have the units themselves be conditional, so you would add a copy of each unit per supported language. I don't know how well this would work because it would be hard to see that the various copies were correctly synchronized.
Thinking this through some more, in both cases it would be very hard to manage a large course. Essentially every block would need to have multiple variants, and at that point maybe you are going through as much work as building the course multiple times. Would there ever be any shared content across these courses, or would every block have to be rebuilt for each language? Maybe the key point is that the core settings of the block is the same, and it is just any text settings that have to change. If there are more of the former than the latter, then your suggestion would scale better.
I hope this is helpful. I think this is a very exciting area to be improving as we try to make Open edX available to the whole world.
Thanks,
- Andy