core-i18n
Summary
Provides functions to help translates the application. Translations are grouped by dictionaries.
Item Index
Methods
Methods
getTranslations
Syntax
getTranslations
(
async
-
dictionary -
code -
callback
Summary
Gets a dictionary of translations by its name and language. Search is made on i18n directory and all plugin's i18n directories. If the same dictionary name is found twice (same file name in different i18n directories), dictionaries are merged.
Parameters:
Example:
var i18n = require('@openveo/api').i18n;
i18n.getTranslations('login', 'fr-FR', function(error, translations){
console.log(translations);
});
var i18n = require('@openveo/api').i18n;
i18n.getTranslations("back-office", "en", function(error, translations){
console.log(translations);
});