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>
25 lines
615 B
TypeScript
25 lines
615 B
TypeScript
import {getRequestConfig} from 'next-intl/server';
|
|
import ro from './messages/ro.json';
|
|
import en from './messages/en.json';
|
|
import es from './messages/es.json';
|
|
import it from './messages/it.json';
|
|
|
|
// Can be imported from a shared config
|
|
export const locales = ['en', 'ro', 'es', 'it'] as const;
|
|
|
|
const messages = {
|
|
ro,
|
|
en,
|
|
es,
|
|
it
|
|
} as const;
|
|
|
|
export default getRequestConfig(async ({locale}) => {
|
|
// Ensure locale has a value, default to 'ro' if undefined
|
|
const validLocale = (locale || 'en') as keyof typeof messages;
|
|
|
|
return {
|
|
locale: validLocale,
|
|
messages: messages[validLocale]
|
|
};
|
|
}); |