mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: add translateKeys
This commit is contained in:
@@ -605,6 +605,9 @@
|
|||||||
warn('Translation failed: ' + err.stack);
|
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
|
* Add translations to the cache
|
||||||
|
|||||||
Reference in New Issue
Block a user