Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

How I can change Loading... in Splash Screen by i18n


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>


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


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"})


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(