feat: Added support for i18n (#2439)

* Added translation for various react components in OHIF-v3

* Added a test language for debugging- test-LNG 

* Added copy for test language to not get overwritten
This commit is contained in:
Alireza authored and GitHub committed 2021-06-15 10:56:33 -04:00
1 parent fdb6ca41d6
commit 1bf651e763
42 files changed
+365 -63

No files matched your search

@@ -10,6 +10,10 @@ import {
useModal,
} from '@ohif/ui';
import i18n from '@ohif/i18n';
const { availableLanguages, defaultLanguage, currentLanguage } = i18n;
import { useAppConfig } from '@state';
function Toolbar({ servicesManager }) {
@@ -108,8 +112,12 @@ function ViewerLayout({
hotkeyDefaults
),
hotkeyDefinitions,
currentLanguage: currentLanguage(),
availableLanguages,
defaultLanguage,
onCancel: hide,
onSubmit: ({ hotkeyDefinitions }) => {
onSubmit: ({ hotkeyDefinitions, language }) => {
i18n.changeLanguage(language.value);
hotkeysManager.setHotkeys(hotkeyDefinitions);
hide();
},