mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-26 12:47:55 +02:00
Add Swedish locale (#244)
* Add Swedish locale * Stop reload when changing language * Add translation * Remove unused
This commit is contained in:
parent
0546ed44a9
commit
2bacb67beb
10 changed files with 194 additions and 14 deletions
|
@ -17,12 +17,14 @@ export const LanguageSelect: React.VoidFunctionComponent<{
|
|||
Cookies.set("NEXT_LOCALE", e.target.value, {
|
||||
expires: 365,
|
||||
});
|
||||
router.push(router.asPath, router.asPath, { locale: e.target.value });
|
||||
onChange?.(e.target.value);
|
||||
}}
|
||||
>
|
||||
<option value="en">{t("english")}</option>
|
||||
<option value="fr">{t("french")}</option>
|
||||
<option value="de">{t("german")}</option>
|
||||
<option value="sv">{t("swedish")}</option>
|
||||
</select>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue