feat: add Spanish language support

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

Users can now access the app in Spanish at /es/* routes and select Spanish 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 17:58:35 +00:00
parent 989f231d5a
commit e39bb5bbba
5 changed files with 589 additions and 8 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'].includes(locale)
const isValidLocale = ['ro', 'en', 'es'].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)/:path*'
'/(ro|en|es)/:path*'
],
}