Translate tabbar items

This commit is contained in:
Zoe Roux 2024-05-28 22:49:43 +02:00
parent c203fa8eea
commit af66b31e35
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View File

@ -23,8 +23,11 @@ import Browse from "@material-symbols/svg-400/rounded/browse-fill.svg";
import Downloading from "@material-symbols/svg-400/rounded/downloading-fill.svg";
import Home from "@material-symbols/svg-400/rounded/home-fill.svg";
import { Tabs } from "expo-router";
import { useTranslation } from "react-i18next";
export default function TabsLayout() {
const { t } = useTranslation();
return (
<Tabs
screenOptions={{
@ -34,21 +37,21 @@ export default function TabsLayout() {
<Tabs.Screen
name="index"
options={{
tabBarLabel: "Home",
tabBarLabel: t("navbar.home"),
tabBarIcon: ({ color, size }) => <Icon icon={Home} color={color} size={size} />,
}}
/>
<Tabs.Screen
name="browse"
options={{
tabBarLabel: "Browse",
tabBarLabel: t("navbar.browse"),
tabBarIcon: ({ color, size }) => <Icon icon={Browse} color={color} size={size} />,
}}
/>
<Tabs.Screen
name="downloads"
options={{
tabBarLabel: "Downloads",
tabBarLabel: t("navbar.download"),
tabBarIcon: ({ color, size }) => <Icon icon={Downloading} color={color} size={size} />,
}}
/>

View File

@ -103,6 +103,7 @@
"navbar": {
"home": "Home",
"browse": "Browse",
"download": "Download",
"search": "Search",
"login": "Login",
"admin": "Admin panel"