Configures hif-vtk-extention to use ohif-i18n for translation and include load more locations

This commit is contained in:
João Felipe Medeiros Moreira committed 2019-06-07 15:35:54 -03:00
1 parent 56b595980e
commit 42cb8e32c7
10 files changed
+113 -63

No files matched your search

+13 -1
View File
@@ -50,6 +50,18 @@ function getLocales() {
return locales;
}
function addLocales(context) {
context.keys().forEach(key => {
i18n.addResourceBundle(
getCleanKeyForNameSpaces(key),
getNameSpaceString(key),
context(key),
true,
true
);
});
}
let translate;
i18n
@@ -78,5 +90,5 @@ i18n
translate = t;
});
export { translate as t, withTranslation, I18nextProvider };
export { translate as t, withTranslation, I18nextProvider, addLocales };
export default i18n;