diff --git a/packages/ui5-webcomponents-react-seed/README.md b/packages/ui5-webcomponents-react-seed/README.md
index 52a6f524a02..e82295d3167 100644
--- a/packages/ui5-webcomponents-react-seed/README.md
+++ b/packages/ui5-webcomponents-react-seed/README.md
@@ -13,9 +13,9 @@ The goal of this repository is to increase the boostrap time spent on a new proj
- Enviroment Variables Up & Running.
-- PR Template
+- Internalization Up & Running.
-
+- PR Template.
- IE Support.
@@ -78,11 +78,19 @@ Builds the app for production to the `build` folder.
Used to manipulate async request, data fetching, cache and more (no redux / saga anymore).
+[Tutorial Link](https://www.youtube.com/watch?v=yccbCol546c), [Random Post](https://blog.bitsrc.io/how-to-start-using-react-query-4869e3d5680d) and [Creator Official Video](https://www.youtube.com/watch?v=seU46c6Jz7E).
+
### `react-helmet`
Used to manpilate DOM attributes through JSX such as `
`.
-[Tutorial Link](https://www.youtube.com/watch?v=yccbCol546c), [Random Post](https://blog.bitsrc.io/how-to-start-using-react-query-4869e3d5680d) and [Creator Official Video](https://www.youtube.com/watch?v=seU46c6Jz7E).
+### `react-i18next`
+
+Used to translate strings and text in the application following the Internationalization pattern.
+
+### `i18next-browser-languagedetector`
+
+Used to identify the browsers culture and change the applications text accordingly.
### `commitlint`
diff --git a/packages/ui5-webcomponents-react-seed/package.json b/packages/ui5-webcomponents-react-seed/package.json
index 3381713aba6..cb1cd1c5135 100644
--- a/packages/ui5-webcomponents-react-seed/package.json
+++ b/packages/ui5-webcomponents-react-seed/package.json
@@ -11,10 +11,13 @@
"@ui5/webcomponents-icons": "1.0.0-rc.8",
"@ui5/webcomponents-react": "^0.10.0",
"axios": "^0.20.0",
+ "i18next": "^19.7.0",
+ "i18next-browser-languagedetector": "^6.0.1",
"jest-environment-jsdom-sixteen": "^1.0.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-helmet": "^6.1.0",
+ "react-i18next": "^11.7.2",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3"
},
diff --git a/packages/ui5-webcomponents-react-seed/public/index.html b/packages/ui5-webcomponents-react-seed/public/index.html
index 04311669cad..f1bd3844809 100644
--- a/packages/ui5-webcomponents-react-seed/public/index.html
+++ b/packages/ui5-webcomponents-react-seed/public/index.html
@@ -1,49 +1,29 @@
-
-
-
-
-
-
-
-
-
-
- React App
-
-
-
-
-
+
+
+
+
diff --git a/packages/ui5-webcomponents-react-seed/src/App.js b/packages/ui5-webcomponents-react-seed/src/App.js
index a07fa9b6e52..5b7f8f14cf6 100644
--- a/packages/ui5-webcomponents-react-seed/src/App.js
+++ b/packages/ui5-webcomponents-react-seed/src/App.js
@@ -1,7 +1,9 @@
import React from 'react';
+import { useTranslation } from 'react-i18next';
import { BrowserRouter } from "react-router-dom";
import { Helmet } from 'react-helmet';
+
import ErrorBoundary from './pages/Fallback/ErrorBoundary';
import Shell from './components/Shell/Shell';
import Routes from './routes/Routes';
@@ -9,10 +11,12 @@ import Routes from './routes/Routes';
import './App.css';
function App() {
+ const { t } = useTranslation();
+
return (
-
-
+
+
diff --git a/packages/ui5-webcomponents-react-seed/src/components/Shell/Shell.js b/packages/ui5-webcomponents-react-seed/src/components/Shell/Shell.js
index 7f2eab699b4..0ef341827a0 100644
--- a/packages/ui5-webcomponents-react-seed/src/components/Shell/Shell.js
+++ b/packages/ui5-webcomponents-react-seed/src/components/Shell/Shell.js
@@ -1,4 +1,5 @@
import React from 'react';
+import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router-dom';
import { ShellBar } from '@ui5/webcomponents-react/lib/ShellBar';
@@ -13,6 +14,7 @@ const style = {
};
const Shell = ({ title, ...props }) => {
+ const { t } = useTranslation();
const history = useHistory();
return (
@@ -20,8 +22,10 @@ const Shell = ({ title, ...props }) => {
data-testid='shell-wrapper'
style={style.shell}
onLogoClick={() => history.push(BrowserURL.HOME)}
- logo={}
primaryTitle={title}
+ logo={
+
+ }
{...props} />
);
}
diff --git a/packages/ui5-webcomponents-react-seed/src/components/Shell/__snapshots__/Shell.test.js.snap b/packages/ui5-webcomponents-react-seed/src/components/Shell/__snapshots__/Shell.test.js.snap
index 0813d7f63cc..7de5ab6ed07 100644
--- a/packages/ui5-webcomponents-react-seed/src/components/Shell/__snapshots__/Shell.test.js.snap
+++ b/packages/ui5-webcomponents-react-seed/src/components/Shell/__snapshots__/Shell.test.js.snap
@@ -7,7 +7,7 @@ exports[`should match snapshot 1`] = `
style="position: fixed; width: 100%; z-index: 100;"
>
diff --git a/packages/ui5-webcomponents-react-seed/src/index.js b/packages/ui5-webcomponents-react-seed/src/index.js
index d5652a01a25..285c424266b 100644
--- a/packages/ui5-webcomponents-react-seed/src/index.js
+++ b/packages/ui5-webcomponents-react-seed/src/index.js
@@ -12,6 +12,8 @@ import '@ui5/webcomponents-react/dist/Assets';
import React from 'react';
import ReactDOM from 'react-dom';
+import './util/i18n';
import App from './App';
+
ReactDOM.render(, document.getElementById('root'));
diff --git a/packages/ui5-webcomponents-react-seed/src/locales/en/translation.json b/packages/ui5-webcomponents-react-seed/src/locales/en/translation.json
new file mode 100644
index 00000000000..ed0f7920029
--- /dev/null
+++ b/packages/ui5-webcomponents-react-seed/src/locales/en/translation.json
@@ -0,0 +1,12 @@
+{
+ "helmet.title.app": "TodoList App",
+ "helmet.title.error": "Buggy Component - TodoList App",
+ "helmet.title.notfound": "NotFound - TodoList App",
+ "shell.title": "TodoList Application",
+ "shell.logo.alt": "SAP Logo",
+ "page.error.text": "Ops! There was an error in loading this page",
+ "page.error.alt": "Error",
+ "page.notfound.text": "Hmmm, we could find this URL",
+ "page.notfound.alt": "Not Found",
+ "page.fallback.reload.text": "Reload this page"
+}
diff --git a/packages/ui5-webcomponents-react-seed/src/locales/pt/translation.json b/packages/ui5-webcomponents-react-seed/src/locales/pt/translation.json
new file mode 100644
index 00000000000..3db8eca05ed
--- /dev/null
+++ b/packages/ui5-webcomponents-react-seed/src/locales/pt/translation.json
@@ -0,0 +1,12 @@
+{
+ "helmet.title.app": "TodoList Applicação",
+ "helmet.title.error": "Component Bugado - TodoList App",
+ "helmet.title.notfound": "Não Encontrado - TodoList App",
+ "shell.title": "TodoList Applicação",
+ "shell.logo.alt": "SAP Logotipo",
+ "page.error.text": "Ops! Houve um erro durante o carregamento desta página",
+ "page.error.alt": "Erro",
+ "page.notfound.text": "Hmmm, não conseguimos encontrar esta página",
+ "page.notfound.alt": "Não Encontrado",
+ "page.fallback.reload.text": "Recarregar"
+}
diff --git a/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Error.js b/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Error.js
index dc0503ec294..5f8e839a2e6 100644
--- a/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Error.js
+++ b/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Error.js
@@ -1,14 +1,22 @@
import React from 'react';
import { Helmet } from 'react-helmet'
+import { useTranslation } from 'react-i18next';
import error from '../../assets/error.png';
import Fallback from './Fallback';
const Error = () => {
+ const { t } = useTranslation();
+
return (
<>
-
-
+
+
>
);
};
diff --git a/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Fallback.js b/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Fallback.js
index dbe12c2038d..9e9e250a734 100644
--- a/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Fallback.js
+++ b/packages/ui5-webcomponents-react-seed/src/pages/Fallback/Fallback.js
@@ -1,4 +1,5 @@
import React from 'react';
+import { useTranslation } from 'react-i18next';
import { FlexBox } from '@ui5/webcomponents-react/lib/FlexBox';
import { FlexBoxAlignItems } from '@ui5/webcomponents-react/lib/FlexBoxAlignItems';
@@ -8,15 +9,21 @@ import { FlexBoxJustifyContent } from '@ui5/webcomponents-react/lib/FlexBoxJusti
import BrowserURL from '../../util/BrowserURL'
const style = {
+ wrapper: {
+ width: '100%',
+ height: '100vh'
+ },
image: {
width: '30%'
}
};
const Fallback = ({ image, altImage, text, reload }) => {
+ const { t } = useTranslation();
+
return (
{