Simple JavaScript variable containing an object with your translations:

var translations = {
    "plural_key": {
        "one": "One user online.",
        "other": "%i users online."
    },
    "simple_key": "Hi, I am a key!"
};
Did this answer your question?