Hello..
I want to change the text in Splash Screen
and the Text value will take from "en.json" or "ar<pre lang="scss"></pre>.json"
<div id="splash-screen" class="splash-screen">
<span>Loading ...</span>
</div>
I added this script in index.html
<script>
<script>
let lang = "ar"
if (localStorage.getItem("i18nConfig")) {
lang = localStorage.getItem("i18nConfig")
lang = lang.substring(lang.length - 4).replace(""}", "")
let spanLoding = document.getElementById("splash-screen").getElementsByTagName("span")[0]
if (lang === "en") {
spanLoding.innerHTML = "Loading... "
}
else if (lang === "tr") {
spanLoding.innerHTML = "Yukleniyor... "
}
}
</script>
</script>
Hi,
Sorry for the delay in reply.
The loading screen markup is included in demo1/index.html.
Yes, you can change the loading screen text dynamically from your javascript using value from local storage.
In your component text can be internationalized using react-intl function as shown below.
import {useIntl} from "react-intl"
const intl = useIntl()
intl.formatMessage({id: "MENU.DASHBOARD"})