init create-fias

This commit is contained in:
Samandar Turgunboyev
2025-12-12 11:21:30 +05:00
commit a5b46a9f26
76 changed files with 36104 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{
"HomePage": {
"title": "Salom dunyo! (Kiril)",
"about": "Go to the about page"
}
}

View File

@@ -0,0 +1,6 @@
{
"HomePage": {
"title": "Hello world!",
"about": "Go to the about page"
}
}

View File

@@ -0,0 +1,10 @@
// This file is auto-generated by next-intl, do not edit directly.
// See: https://next-intl.dev/docs/workflows/typescript#messages-arguments
declare const messages: {
HomePage: {
title: 'Salom dunyo!';
about: 'Go to the about page';
};
};
export default messages;

View File

@@ -0,0 +1,6 @@
{
"HomePage": {
"title": "Salom dunyo!",
"about": "Go to the about page"
}
}

View File

@@ -0,0 +1,7 @@
import { createNavigation } from 'next-intl/navigation';
import { routing } from './routing';
// Lightweight wrappers around Next.js' navigation
// APIs that consider the routing configuration
export const { Link, redirect, usePathname, useRouter, getPathname } =
createNavigation(routing);

View File

@@ -0,0 +1,16 @@
import { getRequestConfig } from 'next-intl/server';
import { hasLocale } from 'next-intl';
import { routing } from './routing';
export default getRequestConfig(async ({ requestLocale }) => {
// Typically corresponds to the `[locale]` segment
const requested = await requestLocale;
const locale = hasLocale(routing.locales, requested)
? requested
: routing.defaultLocale;
return {
locale,
messages: (await import(`./messages/${locale}.json`)).default,
};
});

View File

@@ -0,0 +1,11 @@
import { defineRouting } from 'next-intl/routing';
import { LanguageRoutes } from './types';
export const routing = defineRouting({
// A list of all locales that are supported
locales: [LanguageRoutes.UZ, LanguageRoutes.RU, LanguageRoutes.KI],
// Used when no locale matches
defaultLocale: LanguageRoutes.UZ,
localeDetection: false,
});

View File

@@ -0,0 +1,5 @@
export enum LanguageRoutes {
UZ = 'uz', // o'zbekcha
RU = 'ru', // ruscha
KI = 'ki', // kirilcha
}