Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(