feat: add Italian language support

Added complete Italian (it) translation for the Biblical Guide application:
- Created messages/it.json with full Italian translations
- Updated i18n.ts to include Italian locale
- Updated middleware.ts to handle Italian routes
- Added Italian to language options in all locale files (en, ro, es)

Users can now access the app in Italian at /it/* routes and select Italian from the language settings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-10 18:06:33 +00:00
parent e39bb5bbba
commit 4346112766
6 changed files with 595 additions and 10 deletions

View File

@@ -62,7 +62,7 @@ export async function middleware(request: NextRequest) {
if (!token) {
// Extract locale from pathname for redirect
const locale = request.nextUrl.pathname.split('/')[1]
const isValidLocale = ['ro', 'en', 'es'].includes(locale)
const isValidLocale = ['ro', 'en', 'es', 'it'].includes(locale)
const redirectLocale = isValidLocale ? locale : 'en'
return NextResponse.redirect(new URL(`/${redirectLocale}/auth/login`, request.url))
@@ -83,6 +83,6 @@ export const config = {
// - favicon.ico, robots.txt, sitemap.xml
'/((?!api|admin|_next|_vercel|.*\\..*|favicon.ico|robots.txt|sitemap.xml).*)',
// Match internationalized pathnames
'/(ro|en|es)/:path*'
'/(ro|en|es|it)/:path*'
],
}