Skip to main content

Multilingual Support

Infowebplus supports multiple languages using next-intl.

Supported Languages​

  • English (en) - Default language
  • Spanish (es)
  • Romanian (ro)

How It Works​

Routing​

The application uses Next.js dynamic routes with locale prefixes:

  • /en - English
  • /es - Spanish
  • /ro - Romanian

The default locale (English) is also accessible at the root /.

Translation Files​

Translations are stored in JSON files in the /messages directory:

messages/
├── en.json # English translations
├── es.json # Spanish translations
└── ro.json # Romanian translations

Usage in Components​

import {useTranslations} from 'next-intl';

function MyComponent() {
const t = useTranslations('common');

return <h1>{t('welcome')}</h1>;
}

Usage in Server Components​

import {getTranslations} from 'next-intl/server';

export default async function Page() {
const t = await getTranslations('common');

return <h1>{t('welcome')}</h1>;
}

Adding a New Language​

See the Adding a New Language Guide for detailed instructions.

Content Management​

Sanity CMS supports multilingual content through localized document types. Each content type can have separate documents per language.

SEO​

Each language has its own:

  • Meta tags
  • Open Graph tags
  • Sitemap entries
  • hreflang tags

Next Steps​