|
|
@ -142,27 +142,11 @@ class LaptopNavbar extends Component { |
|
|
|
</Menu> |
|
|
|
</Menu> |
|
|
|
<select |
|
|
|
<select |
|
|
|
className="language-select" |
|
|
|
className="language-select" |
|
|
|
onChange={(e) => { |
|
|
|
onChange={(e) => changeLanguage(e.target.value)} |
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
defaultValue={localStorage.getItem("language") || "fa"} |
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{console.log(window.lang)} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ key: "فارسی", lang: "fa", default: true }, |
|
|
|
|
|
|
|
{ key: "English", lang: "en" }, |
|
|
|
|
|
|
|
{ key: "العربیه", lang: "ar" }, |
|
|
|
|
|
|
|
].map((el, index) => ( |
|
|
|
|
|
|
|
<option |
|
|
|
|
|
|
|
key={el.lang} |
|
|
|
|
|
|
|
value={el.lang} |
|
|
|
|
|
|
|
selected={ |
|
|
|
|
|
|
|
(!window.lang && el.default) || el.lang == window.lang |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
{el.key} |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
</option> |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<div |
|
|
|
<div |
|
|
@ -195,27 +179,11 @@ class LaptopNavbar extends Component { |
|
|
|
<div className="d-flex"> |
|
|
|
<div className="d-flex"> |
|
|
|
<select |
|
|
|
<select |
|
|
|
className="language-select" |
|
|
|
className="language-select" |
|
|
|
onChange={(e) => { |
|
|
|
onChange={(e) => changeLanguage(e.target.value)} |
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
defaultValue={localStorage.getItem("language") || "fa"} |
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{console.log(window.lang)} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ key: "فارسی", lang: "fa", default: true }, |
|
|
|
|
|
|
|
{ key: "English", lang: "en" }, |
|
|
|
|
|
|
|
{ key: "العربیه", lang: "ar" }, |
|
|
|
|
|
|
|
].map((el, index) => ( |
|
|
|
|
|
|
|
<option |
|
|
|
|
|
|
|
key={el.lang} |
|
|
|
|
|
|
|
value={el.lang} |
|
|
|
|
|
|
|
selected={ |
|
|
|
|
|
|
|
(!window.lang && el.default) || el.lang == window.lang |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
{el.key} |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
</option> |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<Link |
|
|
|
<Link |
|
|
|