< Karma
Revision as of 09:32, 24 February 2010 by BryanWB (talk | contribs)

Rough plan for implementing i18n for Karma


  • Integrate with pootle
  • Handle strings inside code and html markup
 $("#someDiv").text(gettext("Hello World"));
  <div>Hello <strong>W</strong>orld</div>
  • All strings stored in one file per locale, messages.json
  • All message identifiers must be unique within an a lesson
  • Accommodating numeric, currency, and date formatting is not an immediate requirement

General Strategy

  • Use a modified version of gettext, where the key for getting translations, we will use an arbitrary message identifier. This will remove the need for managing translation contexts.
  • We will try to use the Internationalization Tag Set for handling strings inline with html. The Okapi tool may be able to parse out strings marked with ITS.
  • We will use this lesson for prototyping examples/6_Maths_matchingAnglesAndShapes/
  • For the immediate future we will dynamically change out strings per locale on page load