diff --git a/AI/GenAI-ChatBot-application-sample/README.md b/AI/GenAI-ChatBot-application-sample/README.md index bb20dd0e..71fad194 100644 --- a/AI/GenAI-ChatBot-application-sample/README.md +++ b/AI/GenAI-ChatBot-application-sample/README.md @@ -61,6 +61,14 @@ To get started, you need to configure one of the supported login providers. Conf - CLERK_SECRET_KEY=YOUR_CLERK_SECRET_KEY - NEXT_PUBLIC_CLERK_TEMPLATE=YOUR_CLERK_TEMPLATE +## Change the application UI language +The sample application uses the i18next library to add internationalization capability. To configure the application user interface to use a different language, follow these steps: + +1. In the `.env.local` file, set the NEXT_PUBLIC_LANGUAGE variable to your selected language. The default language is en. +2. Copy any existing `genAi.json` file and create a new `genAi.json` file containing the UI text. Store the file in `src/locales//`. +3. Translate all UI text in the `genAi.json` file to your preferred language. +4. Reload the sample application. + ## Install the application To install the sample application, run the following command: diff --git a/AI/GenAI-ChatBot-application-sample/package-lock.json b/AI/GenAI-ChatBot-application-sample/package-lock.json index a8f10b54..e51eff27 100644 --- a/AI/GenAI-ChatBot-application-sample/package-lock.json +++ b/AI/GenAI-ChatBot-application-sample/package-lock.json @@ -13,17 +13,17 @@ "@types/react-redux": "^7.1.34", "aws-amplify": "5.3.11", "cross-env": "^7.0.3", - "html-react-parser": "^5.2.2", + "html-react-parser": "^5.2.3", "i18next": "^24.2.3", "i18next-resources-to-backend": "^1.2.1", "moment": "^2.30.1", - "next": "15.2.2", + "next": "15.2.4", "next-i18n-router": "^5.5.1", "react": "^19", "react-dom": "^19", "react-i18next": "^15.4.1", "react-redux": "^9.2.0", - "sass": "^1.85.1" + "sass": "^1.86.3" }, "devDependencies": { "@svgr/webpack": "^8.1.0", @@ -31,7 +31,7 @@ "@types/react": "^19", "@types/react-dom": "^19", "eslint": "^9", - "eslint-config-next": "15.2.2", + "eslint-config-next": "15.2.4", "typescript": "^5" } }, @@ -8501,15 +8501,15 @@ } }, "node_modules/@next/env": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.2.tgz", - "integrity": "sha512-yWgopCfA9XDR8ZH3taB5nRKtKJ1Q5fYsTOuYkzIIoS8TJ0UAUKAGF73JnGszbjk2ufAQDj6mDdgsJAFx5CLtYQ==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.4.tgz", + "integrity": "sha512-+SFtMgoiYP3WoSswuNmxJOCwi06TdWE733D+WPjpXIe4LXGULwEaofiiAy6kbS0+XjM5xF5n3lKuBwN2SnqD9g==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.2.2.tgz", - "integrity": "sha512-1+BzokFuFQIfLaRxUKf2u5In4xhPV7tUgKcK53ywvFl6+LXHWHpFkcV7VNeKlyQKUotwiq4fy/aDNF9EiUp4RQ==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.2.4.tgz", + "integrity": "sha512-O8ScvKtnxkp8kL9TpJTTKnMqlkZnS+QxwoQnJwPGBxjBbzd6OVVPEJ5/pMNrktSyXQD/chEfzfFzYLM6JANOOQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8547,9 +8547,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.2.tgz", - "integrity": "sha512-HNBRnz+bkZ+KfyOExpUxTMR0Ow8nkkcE6IlsdEa9W/rI7gefud19+Sn1xYKwB9pdCdxIP1lPru/ZfjfA+iT8pw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.4.tgz", + "integrity": "sha512-1AnMfs655ipJEDC/FHkSr0r3lXBgpqKo4K1kiwfUf3iE68rDFXZ1TtHdMvf7D0hMItgDZ7Vuq3JgNMbt/+3bYw==", "cpu": [ "arm64" ], @@ -8563,9 +8563,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.2.tgz", - "integrity": "sha512-mJOUwp7al63tDpLpEFpKwwg5jwvtL1lhRW2fI1Aog0nYCPAhxbJsaZKdoVyPZCy8MYf/iQVNDuk/+i29iLCzIA==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.4.tgz", + "integrity": "sha512-3qK2zb5EwCwxnO2HeO+TRqCubeI/NgCe+kL5dTJlPldV/uwCnUgC7VbEzgmxbfrkbjehL4H9BPztWOEtsoMwew==", "cpu": [ "x64" ], @@ -8579,9 +8579,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.2.tgz", - "integrity": "sha512-5ZZ0Zwy3SgMr7MfWtRE7cQWVssfOvxYfD9O7XHM7KM4nrf5EOeqwq67ZXDgo86LVmffgsu5tPO57EeFKRnrfSQ==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.4.tgz", + "integrity": "sha512-HFN6GKUcrTWvem8AZN7tT95zPb0GUGv9v0d0iyuTb303vbXkkbHDp/DxufB04jNVD+IN9yHy7y/6Mqq0h0YVaQ==", "cpu": [ "arm64" ], @@ -8595,9 +8595,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.2.tgz", - "integrity": "sha512-cgKWBuFMLlJ4TWcFHl1KOaVVUAF8vy4qEvX5KsNd0Yj5mhu989QFCq1WjuaEbv/tO1ZpsQI6h/0YR8bLwEi+nA==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.4.tgz", + "integrity": "sha512-Oioa0SORWLwi35/kVB8aCk5Uq+5/ZIumMK1kJV+jSdazFm2NzPDztsefzdmzzpx5oGCJ6FkUC7vkaUseNTStNA==", "cpu": [ "arm64" ], @@ -8611,9 +8611,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.2.tgz", - "integrity": "sha512-c3kWSOSsVL8rcNBBfOq1+/j2PKs2nsMwJUV4icUxRgGBwUOfppeh7YhN5s79enBQFU+8xRgVatFkhHU1QW7yUA==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.4.tgz", + "integrity": "sha512-yb5WTRaHdkgOqFOZiu6rHV1fAEK0flVpaIN2HB6kxHVSy/dIajWbThS7qON3W9/SNOH2JWkVCyulgGYekMePuw==", "cpu": [ "x64" ], @@ -8627,9 +8627,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.2.tgz", - "integrity": "sha512-PXTW9PLTxdNlVYgPJ0equojcq1kNu5NtwcNjRjHAB+/sdoKZ+X8FBu70fdJFadkxFIGekQTyRvPMFF+SOJaQjw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.4.tgz", + "integrity": "sha512-Dcdv/ix6srhkM25fgXiyOieFUkz+fOYkHlydWCtB0xMST6X9XYI3yPDKBZt1xuhOytONsIFJFB08xXYsxUwJLw==", "cpu": [ "x64" ], @@ -8643,9 +8643,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.2.tgz", - "integrity": "sha512-nG644Es5llSGEcTaXhnGWR/aThM/hIaz0jx4MDg4gWC8GfTCp8eDBWZ77CVuv2ha/uL9Ce+nPTfYkSLG67/sHg==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.4.tgz", + "integrity": "sha512-dW0i7eukvDxtIhCYkMrZNQfNicPDExt2jPb9AZPpL7cfyUo7QSNl1DjsHjmmKp6qNAqUESyT8YFl/Aw91cNJJg==", "cpu": [ "arm64" ], @@ -8659,9 +8659,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.2.tgz", - "integrity": "sha512-52nWy65S/R6/kejz3jpvHAjZDPKIbEQu4x9jDBzmB9jJfuOy5rspjKu4u77+fI4M/WzLXrrQd57hlFGzz1ubcQ==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.4.tgz", + "integrity": "sha512-SbnWkJmkS7Xl3kre8SdMF6F/XDh1DTFEhp0jRTj/uB8iPKoU2bb2NDfcu+iifv1+mxQEd1g2vvSxcZbXSKyWiQ==", "cpu": [ "x64" ], @@ -11711,13 +11711,13 @@ } }, "node_modules/eslint-config-next": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.2.2.tgz", - "integrity": "sha512-g34RI7RFS4HybYFwGa/okj+8WZM+/fy+pEM+aqRQoVvM4gQhKrd4wIEddKmlZfWD75j8LTwB5zwkmNv3DceH1A==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.2.4.tgz", + "integrity": "sha512-v4gYjd4eYIme8qzaJItpR5MMBXJ0/YV07u7eb50kEnlEmX7yhOjdUdzz70v4fiINYRjLf8X8TbogF0k7wlz6sA==", "dev": true, "license": "MIT", "dependencies": { - "@next/eslint-plugin-next": "15.2.2", + "@next/eslint-plugin-next": "15.2.4", "@rushstack/eslint-patch": "^1.10.3", "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", @@ -12844,9 +12844,9 @@ } }, "node_modules/html-react-parser": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-5.2.2.tgz", - "integrity": "sha512-yA5012CJGSFWYZsgYzfr6HXJgDap38/AEP4ra8Cw+WHIi2ZRDXRX/QVYdumRf1P8zKyScKd6YOrWYvVEiPfGKg==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-5.2.3.tgz", + "integrity": "sha512-y34oKTu+9T1fKdJE1cN9QWFWu8sx8Qa5tJOafUfMUF5Niah+yF6zlEHhWh7a0iZEcLRPIMw54bY14ajQF7xP7A==", "license": "MIT", "dependencies": { "domhandler": "5.0.3", @@ -14773,12 +14773,12 @@ "peer": true }, "node_modules/next": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/next/-/next-15.2.2.tgz", - "integrity": "sha512-dgp8Kcx5XZRjMw2KNwBtUzhngRaURPioxoNIVl5BOyJbhi9CUgEtKDO7fx5wh8Z8vOVX1nYZ9meawJoRrlASYA==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/next/-/next-15.2.4.tgz", + "integrity": "sha512-VwL+LAaPSxEkd3lU2xWbgEOtrM8oedmyhBqaVNmgKB+GvZlCy9rgaEc+y2on0wv+l0oSFqLtYD6dcC1eAedUaQ==", "license": "MIT", "dependencies": { - "@next/env": "15.2.2", + "@next/env": "15.2.4", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", @@ -14793,14 +14793,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.2.2", - "@next/swc-darwin-x64": "15.2.2", - "@next/swc-linux-arm64-gnu": "15.2.2", - "@next/swc-linux-arm64-musl": "15.2.2", - "@next/swc-linux-x64-gnu": "15.2.2", - "@next/swc-linux-x64-musl": "15.2.2", - "@next/swc-win32-arm64-msvc": "15.2.2", - "@next/swc-win32-x64-msvc": "15.2.2", + "@next/swc-darwin-arm64": "15.2.4", + "@next/swc-darwin-x64": "15.2.4", + "@next/swc-linux-arm64-gnu": "15.2.4", + "@next/swc-linux-arm64-musl": "15.2.4", + "@next/swc-linux-x64-gnu": "15.2.4", + "@next/swc-linux-x64-musl": "15.2.4", + "@next/swc-win32-arm64-msvc": "15.2.4", + "@next/swc-win32-x64-msvc": "15.2.4", "sharp": "^0.33.5" }, "peerDependencies": { @@ -16060,9 +16060,9 @@ } }, "node_modules/sass": { - "version": "1.85.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.1.tgz", - "integrity": "sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag==", + "version": "1.86.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.86.3.tgz", + "integrity": "sha512-iGtg8kus4GrsGLRDLRBRHY9dNVA78ZaS7xr01cWnS7PEMQyFtTqBiyCrfpTYTZXRWM94akzckYjh8oADfFNTzw==", "license": "MIT", "dependencies": { "chokidar": "^4.0.0", diff --git a/AI/GenAI-ChatBot-application-sample/package.json b/AI/GenAI-ChatBot-application-sample/package.json index 328b0419..d85140f3 100644 --- a/AI/GenAI-ChatBot-application-sample/package.json +++ b/AI/GenAI-ChatBot-application-sample/package.json @@ -14,17 +14,17 @@ "@types/react-redux": "^7.1.34", "aws-amplify": "5.3.11", "cross-env": "^7.0.3", - "html-react-parser": "^5.2.2", + "html-react-parser": "^5.2.3", "i18next": "^24.2.3", "i18next-resources-to-backend": "^1.2.1", "moment": "^2.30.1", - "next": "15.2.2", + "next": "15.2.4", "next-i18n-router": "^5.5.1", "react": "^19", "react-dom": "^19", "react-i18next": "^15.4.1", "react-redux": "^9.2.0", - "sass": "^1.85.1" + "sass": "^1.86.3" }, "devDependencies": { "@svgr/webpack": "^8.1.0", @@ -32,7 +32,7 @@ "@types/react": "^19", "@types/react-dom": "^19", "eslint": "^9", - "eslint-config-next": "15.2.2", + "eslint-config-next": "15.2.4", "typescript": "^5" } }