Skip to content

Internationalisation (i18n)

FireCMS ships with a built-in internationalisation system powered by i18next and react-i18next. Out of the box the following languages are supported:

CodeLanguage
enEnglish (default)
esSpanish
deGerman
frFrench
itItalian
hiHindi

All language switching, persistence between sessions, and string lookup are handled automatically by FireCMSi18nProvider, which you mount at the root of your FireCMS component tree.


Wrap your FireCMS tree with FireCMSi18nProvider. You can see a full wiring example in the Sample PRO Project page — the snippet below focuses only on the i18n part:

import {
FireCMS,
FireCMSi18nProvider,
ModeControllerProvider,
Scaffold, AppBar, Drawer, NavigationRoutes, SideDialogs,
SnackbarProvider,
// … other imports
} from "@firecms/core";
export function MyCMSApp() {
// … set up controllers (auth, navigation, storage, etc.)
return (
<SnackbarProvider>
<FireCMSi18nProvider locale="es">
<ModeControllerProvider value={modeController}>
<FireCMS
navigationController={navigationController}
authController={authController}
dataSourceDelegate={firestoreDelegate}
storageSource={storageSource}
>
{({ context, loading }) => {
if (loading) return <CircularProgressCenter size="large" />;
return (
<Scaffold>
<AppBar title="My CMS" />
<Drawer />
<NavigationRoutes />
<SideDialogs />
</Scaffold>
);
}}
</FireCMS>
</ModeControllerProvider>
</FireCMSi18nProvider>
</SnackbarProvider>
);
}

The locale prop accepts any BCP-47 language tag ("en", "es", "de", …).

When a user changes the language through the FireCMS UI, the choice is saved to localStorage under the key firecms_locale. On the next visit the stored preference takes priority over the locale prop — unless you clear it manually.


You can replace any FireCMS UI string without touching the library source code. Use the translations prop on FireCMSi18nProvider:

import { FireCMSi18nProvider } from "@firecms/core";
import type { FireCMSTranslations } from "@firecms/core";
// Only include the keys you want to change — everything else keeps its default.
const myTranslations: { [locale: string]: Partial<FireCMSTranslations> } = {
en: {
save: "Publish",
discard: "Throw away",
delete: "Remove",
},
es: {
save: "Publicar",
discard: "Descartar",
},
};
// Inside your component tree:
<FireCMSi18nProvider locale="en" translations={myTranslations}>
{/* … */}
</FireCMSi18nProvider>

Overrides are deep-merged on top of the built-in strings — keys you don’t provide keep their default values. Overrides are re-applied whenever the translations prop reference changes.


If your target language is not listed above, create an object that satisfies DeepPartial<FireCMSTranslations> (you don’t have to provide every key — missing keys fall back to English automatically) and pass it under a new locale code:

import { FireCMSi18nProvider } from "@firecms/core";
const ptTranslations = {
save: "Guardar",
create: "Criar",
discard: "Descartar",
cancel: "Cancelar",
delete: "Eliminar",
edit: "Editar",
copy: "Copiar",
search: "Pesquisar",
filter: "Filtro",
loading: "A carregar...",
// … add as many keys as you need; the rest default to English
};
<FireCMSi18nProvider
locale="pt" // activate the new locale
translations={{ pt: ptTranslations }} // provide its strings
>
{/* … */}
</FireCMSi18nProvider>

PropTypeDefaultDescription
localestring"en"BCP-47 language tag for the active language.
translationsRecord<string, DeepPartial<FireCMSTranslations>>Per-locale string overrides / additions.

All translatable strings are defined in the FireCMSTranslations interface exported from @firecms/core. Below is a categorised summary of the most commonly customised keys:

KeyDefault (en)
saveSave
createCreate
save_and_closeSave and close
create_and_closeCreate and close
create_copyCreate copy
discardDiscard
clearClear
cancelCancel
KeyDefault (en)
editEdit
copyCopy
deleteDelete
delete_selectedDelete
KeyDefault (en)
searchSearch
filterFilter
no_itemsNo items
no_entries_foundNo entries found
create_your_first_entryCreate your first entry
addAdd
removeRemove
KeyDefault (en)
delete_confirmation_titleDelete?
delete_confirmation_bodyThis will delete the entity. Are you sure?
unsaved_changes_titleUnsaved changes
unsaved_changes_bodyYou have unsaved changes. Do you want to discard them?
discard_changesDiscard changes
keep_editingKeep editing
KeyDefault (en)
open_menuOpen menu
close_drawerClose drawer
homeHome
adminAdmin
log_outLog out
KeyDefault (en)
errorError
error_uploading_fileError uploading file
error_deletingError deleting
internal_errorInternal ERROR
page_not_foundPage not found
back_to_homeBack to home
KeyDefault (en)
auth_sign_inSign In
auth_sign_upSign Up
auth_passwordPassword
auth_reset_passwordReset password
auth_wrong_passwordWrong password. Please try again.
auth_user_not_foundUser not found
KeyDefault (en)
importImport
import_dataImport data
exportExport
export_dataExport data
downloadDownload

For the complete list of keys with their TypeScript definitions, see the FireCMSTranslations source file and the English baseline locale on GitHub.


Dynamically switching languages at runtime

Section titled “Dynamically switching languages at runtime”

You can change the active language at runtime by updating the locale prop. FireCMS will switch automatically unless the user has already stored a personal preference in localStorage.

To clear the stored preference and force a language change:

import { FIRECMS_LOCALE_STORAGE_KEY } from "@firecms/core";
// Clear user preference, then set the new locale via the `locale` prop
localStorage.removeItem(FIRECMS_LOCALE_STORAGE_KEY);

If you add a full translation for a new language and would like to share it with the community, we welcome pull requests!

  1. Add a new file packages/firecms_core/src/locales/<code>.ts following the structure of the existing en.ts.
  2. Register it inside FireCMSi18nProvider.tsx.
  3. Open a pull request — thank you! 🎉

Have questions? Join the Discord community.