diff --git a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/controller/HomeController.java b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/controller/HomeController.java index 08cb8f371..6063148de 100644 --- a/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/controller/HomeController.java +++ b/powerauth-webflow/src/main/java/io/getlime/security/powerauth/app/webflow/controller/HomeController.java @@ -192,6 +192,9 @@ public String authenticate(Map model, HttpServletRequest request model.put("i18n_EN", i18nService.generateMessages(Locale.ENGLISH)); model.put("i18n_UK", i18nService.generateMessages(new Locale("uk"))); model.put("i18n_RO", i18nService.generateMessages(new Locale("ro"))); + model.put("i18n_DE", i18nService.generateMessages(new Locale("de"))); + model.put("i18n_FR", i18nService.generateMessages(new Locale("fr"))); + model.put("i18n_ES", i18nService.generateMessages(new Locale("es"))); model.put("operationHash", operationSessionService.generateOperationHash(operationId)); model.put("showAndroidSecurityWarning", webFlowConfig.getShowAndroidSecurityWarning()); model.put("usernameMaxLength", webFlowConfig.getUsernameMaxLength()); diff --git a/powerauth-webflow/src/main/js/client.js b/powerauth-webflow/src/main/js/client.js index 6fa25e4d5..eb7cd71da 100644 --- a/powerauth-webflow/src/main/js/client.js +++ b/powerauth-webflow/src/main/js/client.js @@ -35,19 +35,31 @@ import enLocaleData from "react-intl/locale-data/en"; import csLocaleData from "react-intl/locale-data/cs"; import ukLocaleData from "react-intl/locale-data/uk"; import roLocaleData from "react-intl/locale-data/ro"; +import deLocaleData from "react-intl/locale-data/de"; +import frLocaleData from "react-intl/locale-data/fr"; +import esLocaleData from "react-intl/locale-data/es"; -// currently only EN and CS languages are supported + +// currently specific languages are supported addLocaleData([ ...enLocaleData, ...csLocaleData, ...ukLocaleData, - ...roLocaleData + ...roLocaleData, + ...deLocaleData, + ...frLocaleData, + ...esLocaleData + ]); const languagesMapping = [ {"code":"en", "country" : "US"}, {"code":"cs", "country" : "CZ"}, {"code":"ro", "country" : "RO"}, - {"code":"uk", "country" : "UA"} + {"code":"uk", "country" : "UA"}, + {"code":"de", "country" : "DE"}, + {"code":"fr", "country" : "FR"}, + {"code":"es", "country" : "ES"} + ]; // check if language is supported @@ -93,6 +105,12 @@ if (msie && msie < 9) { window.alert(I18N_UK.messages["browser.unsupported"]); } else if (lang === "ro") { window.alert(I18N_RO.messages["browser.unsupported"]); + } else if (lang === "de") { + window.alert(I18N_DE.messages["browser.unsupported"]); + } else if (lang === "fr") { + window.alert(I18N_FR.messages["browser.unsupported"]); + } else if (lang === "es") { + window.alert(I18N_ES.messages["browser.unsupported"]); } else { window.alert(I18N_EN.messages["browser.unsupported"]); } diff --git a/powerauth-webflow/src/main/js/components/app.js b/powerauth-webflow/src/main/js/components/app.js index cca160e3b..50568afd8 100644 --- a/powerauth-webflow/src/main/js/components/app.js +++ b/powerauth-webflow/src/main/js/components/app.js @@ -56,7 +56,10 @@ export class App extends React.Component { {"code":"en", "country" : "US"}, {"code":"cs", "country" : "CZ"}, {"code":"ro", "country" : "RO"}, - {"code":"uk", "country" : "UA"} + {"code":"uk", "country" : "UA"}, + {"code":"de", "country" : "DE"}, + {"code":"fr", "country" : "FR"}, + {"code":"es", "country" : "ES"} ]; }