added multi language features

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-03-31 19:45:21 +05:00
parent 4f3d73443f
commit 291375ce02
19 changed files with 728 additions and 246 deletions

View File

@@ -1,8 +1,8 @@
import { MenuItem } from './model';
import { LanguageRoutes } from '@/shared/config/i18n/types';
const menu: MenuItem[] = [
{ title: 'About Site', url: '/about' },
const getMenu = (t: (key: string) => string): MenuItem[] => [
{ title: t('aboutSite'), url: '/about' },
// {
// title: 'Products',
// url: '#',
@@ -16,7 +16,7 @@ const menu: MenuItem[] = [
// ],
// },
{
title: 'Contact',
title: t('contact'),
url: '/contact',
},
];
@@ -36,4 +36,4 @@ const languages: { name: string; key: LanguageRoutes }[] = [
},
];
export { menu, languages };
export { getMenu, languages };