Karma/i18n

From Sugar Labs

Jump to: navigation, search

Rough plan for implementing i18n for Karma

Contents

Requirements

 Examples 
 $("#someDiv").text(gettext("Hello World"));
 
  <div>Hello <strong>W</strong>orld</div>
  

General Strategy

JavaScript Strings

We try to follow a subset of the gettext api quite closely. After including jquery.i18n.js you can use the following gettext functions in your javascript scripts:

Remarks:

More resources: http://forum.jquery.com/topic/locale-information-should-be-separated-from-plugins http://wiki.jqueryui.com/i18n

HTML Strings

The Python library itools automates the job of parsing the HTML and creating the PO files. There are already concrete experiments, which you can find here.

Things which still need to be done:

I'm still actively working on it. Questions, comments, suggestions > km0r3 AT sugarlabs DOT org .

Personal tools
Namespaces
Variants
Actions
Sugar
Projects
Teams
Local Labs
Using the Wiki
Google translations