Is it possible to integrate multiple projects in the same app/website?
Yes, you can! Locize allows you to combine as many projects as you need within a single app or website. This is useful for:
- Large apps with modular or shared components
- Organizations managing multiple brands or products
- Teams splitting translations by domain, customer, or environment
How to Integrate Multiple Projects
You can fetch translations from different Locize projects by using the correct API endpoints and project IDs. This gives you full flexibility to organize your translations as you see fit.
Using i18next?
With i18next, you can use the i18next-chained-backend to load translations from multiple Locize projects. Just add the i18next-locize-backend multiple times with different options:
import i18next from "i18next";
import ChainedBackend from "i18next-chained-backend";
import LocizeBackend from "i18next-locize-backend";
i18next
.use(ChainedBackend)
.init({
fallbackLng: "en",
backend: {
backends: [LocizeBackend, LocizeBackend],
backendOptions: [
{ projectId: "[PROJECTID_1]", version: "[VERSION]" },
{ projectId: "[PROJECTID_2]", version: "[VERSION]" }
]
}
// ...other i18next config
});Tip: Make sure each project uses unique namespace names (e.g. project 1: common, header; project 2: mails, templates).
The chained backend will use the first backend that returns data for a namespace. It does not merge keys from multiple sources.
Caution: Avoid using multiple backends with saveMissing or updateMissing enabled, as this can lead to unexpected results if data is stale.
Shared Frameworks or Core Modules
If you have shared components (like a design system or core module) used across multiple apps, consider using separate i18next instances, each pointing to its own Locize project. This keeps translations organized and maintainable.
Customer-Specific Translations?
If you need customer-specific translations, we recommend using the Multi-Tenant feature instead of combining multiple projects. This is more scalable and easier to manage.