How do make those strings multi-lingual and available in a different language (lets say we have a french speaking user logged in)?
I guess there must be an App available to do this?
What is best practise?
Mongo.Collection.prototype.internationalize = function(){
var schema = this.simpleSchema()._schema;
_.each(schema, function (property, key) {
if (!property.label) {
schema[key].label = function () {
// if property is nested ("telescope.email"), only consider the last part ("email")
if (key.indexOf(".") !== -1) {
key = _.last(key.split("."));
}
return i18n.t(key); // i18n.t() is my i18n function
};
}
});
return this;
};
// later…
Meteor.startup(function(){
Comments.internationalize();
});