- SubCategory topilmadi
+ {t("subcategory_not_found")}
)}
@@ -225,7 +227,7 @@ export default function Filter() {
{visibleSectionData && visibleSectionData.length > 0 && (
- Bo'lim
+ {t("section")}
{visibleSectionData.map((item: any) => (
diff --git a/components/pages/products/filter/filterInfo.tsx b/components/pages/products/filter/filterInfo.tsx
index 4215df9..e1e4bbb 100644
--- a/components/pages/products/filter/filterInfo.tsx
+++ b/components/pages/products/filter/filterInfo.tsx
@@ -2,17 +2,18 @@
import { useFilter } from "@/lib/filter-zustand";
import { X } from "lucide-react";
+import { useTranslations } from "next-intl";
export default function FilterInfo() {
const filtered = useFilter((state) => state.filter);
const resetFilter = useFilter((state) => state.resetFilter);
const togleFilter = useFilter((state) => state.toggleFilter);
+ const t = useTranslations();
if (filtered.length === 0) {
return null;
}
return (
-
Found: 20
{filtered &&
filtered.map((item) => (
@@ -28,7 +29,7 @@ export default function FilterInfo() {
))}
);
diff --git a/components/pages/products/slug/slider.tsx b/components/pages/products/slug/slider.tsx
index 349621c..fefe084 100644
--- a/components/pages/products/slug/slider.tsx
+++ b/components/pages/products/slug/slider.tsx
@@ -8,12 +8,14 @@ import "swiper/css/navigation";
import "swiper/css/pagination";
import "swiper/css/thumbs";
import Image from "next/image";
+import { useTranslations } from "next-intl";
const navigationPrevEl = ".custom-swiper-prev";
const navigationNextEl = ".custom-swiper-next";
export function SliderComp({ imgs }: { imgs: string[] }) {
const [thumbsSwiper, setThumbsSwiper] = useState
(null);
+ const t = useTranslations();
// Agar rasm bo'lmasa
if (!imgs || imgs.length === 0) {
@@ -33,7 +35,7 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
/>
- Rasm mavjud emas
+ {t("image_not_found")}
);
@@ -45,7 +47,10 @@ export function SliderComp({ imgs }: { imgs: string[] }) {
{/* header */}
- FAQ
+ {locale === "ru" ? "ФАК" : "FAQ"}
- General Questions
+ {t("faq.banner.topic")}
{/* FAQ Section */}
-
diff --git a/components/pages/subCategory/body.tsx b/components/pages/subCategory/body.tsx
index 1db426e..afecde6 100644
--- a/components/pages/subCategory/body.tsx
+++ b/components/pages/subCategory/body.tsx
@@ -5,9 +5,11 @@ import { endPoints } from "@/request/links";
import { useQuery } from "@tanstack/react-query";
import { useCategory } from "@/store/useCategory";
import Card from "./card";
+import { useTranslations } from "next-intl";
export function MainSubCategory() {
const category = useCategory((state) => state.category);
+ const t = useTranslations();
const { data, isLoading, error } = useQuery({
queryKey: ["subCategory"],
queryFn: () => httpClient(endPoints.subCategory.byId(category.id)),
@@ -27,7 +29,7 @@ export function MainSubCategory() {
if (error) {
return (
- Ma'lumotlarni yuklashda xatolik yuz berdi
+ {t("loading_error")}
);
}
@@ -35,7 +37,7 @@ export function MainSubCategory() {
if (!data || data.length === 0) {
return (
- Mahsulotlar topilmadi
+ {t("products_not_found")}
);
}
@@ -43,7 +45,7 @@ export function MainSubCategory() {
{data.map((item: any) => (