feat(i18n): add internationalization support with i18next
- Add i18next and related dependencies for translation support - Create locale files for English and Farsi languages - Implement i18n configuration and provider in layout - Set up route factory and constants for internationalized routes - Remove test button components and simplify main page
This commit is contained in:
+1
-39
@@ -1,5 +1,4 @@
|
||||
// ... existing imports ...
|
||||
import Button from '../components/Button'; // Adjust the import path if necessary
|
||||
|
||||
async function getData() {
|
||||
// Simulate a delay to show server-side data fetching
|
||||
@@ -12,44 +11,7 @@ export default async function Home() {
|
||||
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center justify-between p-24 text-gray-300">
|
||||
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
||||
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
||||
{data.message}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="mt-8 flex gap-4">
|
||||
<Button>Default Button</Button>
|
||||
<Button disabled>Disabled Button</Button>
|
||||
<Button loading>Loading Button</Button>
|
||||
<Button endIcon={<span>→</span>}>Button with Icon</Button>
|
||||
</div>
|
||||
|
||||
<div className="mt-8 flex flex-col gap-4">
|
||||
<h3>Standard Buttons:</h3>
|
||||
<div className="flex gap-4">
|
||||
<Button>Default Button</Button>
|
||||
<Button disabled>Disabled Button</Button>
|
||||
<Button loading>Loading Button</Button>
|
||||
<Button endIcon={<span>→</span>}>Button with Icon</Button>
|
||||
</div>
|
||||
|
||||
<h3>Sized Buttons:</h3>
|
||||
<div className="flex gap-4 items-center">
|
||||
<Button size="small">Small Button</Button>
|
||||
<Button size="medium">Medium Button</Button>
|
||||
<Button size="large">Large Button</Button>
|
||||
</div>
|
||||
|
||||
<h3>Icon Buttons:</h3>
|
||||
<div className="flex gap-4 items-center">
|
||||
<Button iconOnly endIcon={<span>←</span>} size="small" />
|
||||
<Button iconOnly endIcon={<span>←</span>} size="medium" />
|
||||
<Button iconOnly endIcon={<span>←</span>} size="large" />
|
||||
<Button iconOnly endIcon={<span>←</span>} disabled size="medium" />
|
||||
<Button iconOnly endIcon={<span>←</span>} loading size="medium" />
|
||||
</div>
|
||||
</div>
|
||||
ssss
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user