feat: add translateKeys

This commit is contained in:
Barış Soner Uşaklı
2022-03-08 11:40:12 -05:00
parent 70e613f814
commit e841d59a67

View File

@@ -605,6 +605,9 @@
warn('Translation failed: ' + err.stack);
});
},
translateKeys: async function (keys, language, cb) {
return await Promise.all(keys.map(key => adaptor.translate(key, language, cb)));
},
/**
* Add translations to the cache