|
|
@ -129,9 +129,29 @@ class LaptopNavbar extends Component { |
|
|
|
{window.t("خروج")}{" "} |
|
|
|
{window.t("خروج")}{" "} |
|
|
|
</MenuItem> |
|
|
|
</MenuItem> |
|
|
|
</Menu> |
|
|
|
</Menu> |
|
|
|
<select className="language-select"> |
|
|
|
<select |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
className="language-select" |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
|
|
|
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} |
|
|
|
|
|
|
|
</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<div |
|
|
|
<div |
|
|
@ -162,9 +182,29 @@ class LaptopNavbar extends Component { |
|
|
|
</> |
|
|
|
</> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<div className="d-flex"> |
|
|
|
<div className="d-flex"> |
|
|
|
<select className="language-select"> |
|
|
|
<select |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
className="language-select" |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
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" }, |
|
|
|
|
|
|
|
{ key: "العربیه", lang: "ar" }, |
|
|
|
|
|
|
|
].map((el, index) => ( |
|
|
|
|
|
|
|
<option |
|
|
|
|
|
|
|
key={el.lang} |
|
|
|
|
|
|
|
value={el.lang} |
|
|
|
|
|
|
|
selected={ |
|
|
|
|
|
|
|
(!window.lang && el.default) || el.lang == window.lang |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{el.key} |
|
|
|
|
|
|
|
</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<Link |
|
|
|
<Link |
|
|
|