GitXplorerGitXplorer
d

gettext-js

public
9 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
8853da5de21391d49c38976858f93948102494c3

Renaming `Store.bindTextDomain` to `.textdomain`

committed 14 years ago
Unverified
224b19d63a1c5a236a6e79b949ae0e443252b634

syntax

committed 14 years ago
Unverified
34b4adeaf4a2c5209b4d5c88a6ca8d1a6b25394c

Filtering `for`-loop with `hasOwnProperty`

committed 14 years ago
Unverified
f860bf25835fa9c40270749ed885220cd580842e

Adding “@requires” doclets.

committed 14 years ago
Unverified
d469c2f3e9a6406ddf127c8beb2963dd35ae0016

Correcting “requires” doclets

committed 14 years ago
Unverified
6ac161e6ed8d4edbfc9804ac4244f1d3c3724c20

Commenting where variables are compared to `null`.

committed 14 years ago

README

The README file for this repository.

gettext-js

About

gettext-js is an implementation of the gettext API in JavaScript, with adaptions to the characteristics of JavaScript. These adaptions arise from the asynchronous characteristics of the language, and the fact that it is used in non latency-free server/client-environments.

Status

Development has just started, and the code is far from beeing complete. The existing code only covers the parsing of PO files, and their serialization to JSON format.

Adaptions

Since JavaScript programs usually make use of asynchronous programming, gettext-js does not support setting a global state of the gettext module.

When binding a textdomain, an object with a defined state is returned, that may listen to language change events occurring higher in the hierarchy, but never changes the domain it has been bound to initially.

For browser-based JavaScript, gettext-js offers the possibility to execute a callback upon catalog/domain load for code that depends on it.

Other adaptions will include lazy evaluation and the possibility to translate DOM nodes (elements and text).