|
|
@ -104,11 +104,25 @@ export default function MobileNavbar(props) { |
|
|
|
<div className="mobile-navbar__left d-flex" style={{ marginLeft: 10 }}> |
|
|
|
<div className="mobile-navbar__left d-flex" style={{ marginLeft: 10 }}> |
|
|
|
<select |
|
|
|
<select |
|
|
|
className="language-select" |
|
|
|
className="language-select" |
|
|
|
onChange={(e) => changeLanguage(e.target.value)} |
|
|
|
onChange={(e) => { |
|
|
|
defaultValue={localStorage.getItem("language") || "fa"} |
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ 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 |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
{el.key} |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<Link |
|
|
|
<Link |
|
|
@ -153,11 +167,23 @@ export default function MobileNavbar(props) { |
|
|
|
<div className="mobile-navbar__left"> |
|
|
|
<div className="mobile-navbar__left"> |
|
|
|
<select |
|
|
|
<select |
|
|
|
className="language-select" |
|
|
|
className="language-select" |
|
|
|
onChange={(e) => changeLanguage(e.target.value)} |
|
|
|
onChange={(e) => { |
|
|
|
defaultValue={localStorage.getItem("language") || "fa"} |
|
|
|
window.localStorage.setItem("language", e.target.value); |
|
|
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{[ |
|
|
|
|
|
|
|
{ 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} |
|
|
|
> |
|
|
|
> |
|
|
|
{["fa", "en", "ar"].map((lang, index) => ( |
|
|
|
{el.key} |
|
|
|
<option key={index}>{lang}</option> |
|
|
|
</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
{page === "home" || page === "download" ? ( |
|
|
|
{page === "home" || page === "download" ? ( |
|
|
|