|
|
|
@ -25,6 +25,17 @@ const fontSize = { |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const changeLanguage = (val) => { |
|
|
|
|
if (val === "fa") { |
|
|
|
|
localStorage.removeItem("language"); |
|
|
|
|
} else if (val === "en") { |
|
|
|
|
localStorage.setItem("language", "en"); |
|
|
|
|
} else { |
|
|
|
|
localStorage.setItem("language", "ar"); |
|
|
|
|
} |
|
|
|
|
window.location.reload(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class LaptopNavbar extends Component { |
|
|
|
|
state = {}; |
|
|
|
|
|
|
|
|
@ -188,9 +199,9 @@ class LaptopNavbar extends Component { |
|
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
window.location.reload(); |
|
|
|
|
}} |
|
|
|
|
value={window.lang} |
|
|
|
|
> |
|
|
|
|
{console.log(window.lang)} |
|
|
|
|
|
|
|
|
|
{[ |
|
|
|
|
{ key: "فارسی", lang: "fa", default: true }, |
|
|
|
|
{ key: "English", lang: "en" }, |
|
|
|
|