Git Product home page Git Product logo

jsperanto's People

Contributors

arjunballa avatar chris-rudmin avatar fernandogmar avatar isra17 avatar janmonschke avatar jpjoyal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jsperanto's Issues

no-conflict constuctor

If jsperanto is used in two or more modules on the same page, translations are replacing each other.

underscore Support

I have made the lib node/underscore compatible. This is done with little easy but the applyReplacement function has to be change because of the callbacks param order in each. see bottom

this should not brake anything, besides for people that are using jquery and underscore they would have to switch to _ such as _.jsperanto.init

Add to the factory function

if (typeof _ !== 'undefined') {
    // Underscore.
    factory(_);
} else if (typeof exports === 'object') {

removed the call to check if function and did it inline

options = (options == Object(options))? options : callback;

applyReplacement

function applyReplacement(string,replacementHash){
    if ($.ajax === undefined) {
        $.each(replacementHash, function (value, key) {
            string = string.split([o.interpolationPrefix, key, o.interpolationSuffix].join('')).join(value);
        });
    } else {
        $.each(replacementHash, function (key, value) {
            string = string.split([o.interpolationPrefix, key, o.interpolationSuffix].join('')).join(value);
        });
    }
    return string;
}

Bower support

It would be nice if I can install jsperanto with bower

Server side use?

Bonjour Jean-Philippe!

Great work on this lib.
I'm debating on a JS localisation library for nodeJs/backbone. JsPeranto would be my first pick for its simplicity, but I'd like to use dictionary on the server as well for email templating. Any experience on using the lib on the client + server?

PS: Your JSON format is fully supported on https://webtranslateit.com, it seem to be quick and simple translating tool, it may be worth mentioning it to other users (as it's solve the entire translation workflow for lazy devs like me).

Cheers!

félix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.