Bridge Mode
Keep your existing i18n library while adding i1n's type-safe autocomplete, AI translation, and file management.
What is Bridge Mode?
Bridge Mode lets you keep your existing i18n library (i18next, react-intl, vue-i18n, ngx-translate, i18n-js) while using i1n to manage translation files, AI translation, and type generation.
Connect your library with a single line using registerI1n(). The i1n t() function delegates to your library under the hood, but with strict type checking and full IDE autocomplete from the generated i1n.d.ts.
Setup by Library
One line per library. Call registerI1n() with your library's translation function and you're done — i1n handles the rest. See the code examples below for your specific setup.
vue-i18n: registerI1n((key, params) => i18n.global.t(key, params)). ngx-translate (Angular): registerI1n((key, params) => translateService.instant(key, params)). i18n-js (React Native): registerI1n((key, params) => i18n.t(key, params)).
Custom function: registerI1n((key, params) => yourLookup(key, params)). Bridge Mode works with any function that takes a key and optional parameters and returns a string.
How It Works
After calling registerI1n(), every call to the i1n t() function is forwarded to your registered callback. i1n adds type safety on top — if a key does not exist in your translation files, TypeScript catches the error at compile time.
i1n continues to manage the translation files (push, pull, AI translate) and generate i1n.d.ts. Your library continues to handle runtime loading, interpolation, and pluralization. Both systems work together seamlessly.
When to Use Bridge Mode vs. Standalone
Use Bridge Mode when you have an existing project with an established i18n library and do not want to rewrite application code. Bridge Mode provides a zero-cost migration path — you can adopt i1n's infrastructure without changing a single component.
Use Standalone Mode for new projects or when you want to replace your i18n library entirely. The i1n SDK handles initialization, interpolation, pluralization, and locale switching natively, with no external dependencies.
import { registerI1n } from 'i1n'
import i18next from 'i18next'
registerI1n((key, params) => i18next.t(key, params)) import { registerI1n } from 'i1n'
import { useIntl } from 'react-intl'
const intl = useIntl()
registerI1n((key, params) => intl.formatMessage({ id: key }, params)) import { registerI1n } from 'i1n'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
registerI1n((key, params) => t(key, params)) import { registerI1n } from 'i1n'
import { TranslateService } from '@ngx-translate/core'
constructor(private translate: TranslateService) {
registerI1n((key, params) => this.translate.instant(key, params))
} import { registerI1n } from 'i1n'
import { I18n } from 'i18n-js'
const i18n = new I18n(translations)
registerI1n((key, params) => i18n.t(key, params)) import { registerI1n } from 'i1n'
// Works with any function: (key, params?) => string
registerI1n((key, params) => myCustomLookup(key, params))