alexanderwallin / node-gettext

A JavaScript implementation of gettext, a localization framework.
Other
188 stars 37 forks source link

Adds support for adding a textdomain from an already parsed json object #27

Closed alexanderwallin closed 8 years ago

alexanderwallin commented 8 years ago

Hi!

I have crossed the land and walked through fire for a plain gettext JavaScript library that accepts standardized JSON translation objects, but to no avail. So I checked the source and realized what a small change be needed for this excellent lib to support this.

The case is I want to use standardized gettext that's populated with translations at runtime in the browser, without doing HTTP requests to .po files (i.e. the translations are bundled in the JavaScript file).

If not, yay! If so, I'll make a new npm package that simply extends this one with that simple check.

andris9 commented 8 years ago

Hey, sorry for missing this

alexanderwallin commented 8 years ago

Awesome! No worries at all.