Translate Next.js

SejHey provides a complete SDK for Next.js, giving you everything you need to localize your application — from in-context editing to CDN delivery and AI translations

Installation
1npm install @sejhey/react-i18n
Usage
1import { SejheyI18n, SejHeyProvider,getSejHeyInitialProps, 
2useTranslate, T} from '@sejhey/react-i18n'
3
4/* Create the i18n instance */
5const i18n = 
6new SejheyI18n({
7 defaultLanguage: 'en', 
8 projectId: 'zbzz-xqjv'
9})
10.useCdnLoader() 
11.useInContextEditor()
12.useLanguagePicker()
13
14
15/* Wrap you app. Usually _app.tsx */
16export default function MyApp({ Component, pageProps, serialized }:
17 { Component: any, pageProps: any, serialized?: any }) {
18  return (
19    <SejHeyProvider i18n={i18n} serialized={serialized}>
20      <Component {...pageProps} />
21    </SejHeyProvider>
22  );
23}
24
25/* Init the plugin on the server side */
26MyApp.getInitialProps = async (appContext: AppContext) => 
27getSejHeyInitialProps(App,appContext, i18n);
28
29
30
31/* Now use translations like this */
32const AnotherComponent = () => {
33  const { t } = useTranslate()
34
35  return (
36    <>
37      <h1>{t('welcome_message')}</h1>
38
39      {/* Or if you prefer a component */}
40
41      <T keyName='welcome_message' />
42    </>
43  )
44}
45

Features

In context editor

Edit and create translations directly on your web page.

In context

Static files

Export translations as static files and bundle them with your app for offline or self-hosted setups.

Lazy loading

Translation files are only loaded when you need when you need them, improving performance in large apps.

AI Translations

Use our AI to generate high-quality translations and suggestions, with full context awareness.

Plurals

SejHey handles complex pluralization rules for every supported language automatically.

Plurals

SSR for Next.js

Full support for server-side rendering in Next.js, ensuring translations load instantly on first render.

Built in CDN

Cloudflare powered CDN distribution for your translations with caching, versioning, and instant updates.

Language picker

A ready-made, customizable language switcher you can drop into your app.

Plurals

Language detection

Automatically detect and load the user’s preferred language based on users preffered language. Multiple options are available.

FAQ

+
How are translations created?
+
Where are translations stored?
+
Where are translations accessed in production?
+
Will my application be dependent on SejHey servers?
+
How can contributors access and modify translations?
+
How do I use the in-context editor?
+
Can I switch to another translation solution later?

Apps & Intgrations

SejHey.com
Translations made easy
© 2024 - 2025 SejHey | All rights reserved