Localization
Localizable
Overview
Setup
1. Global Configuration
translate(token: string): string;getCurrentLocale(): string;
// main.ts
import { setupLocalizable } from '@tradinos/cms-backend-entity';
setupLocalizable({
translate: (token) => app.get<I18nService>(I18nService).translate(token),
getCurrentLocale: () => I18nContext.current()?.lang ?? 'en',
});2. DTO Configuration
LocalizableOptions
Localizable
How It Works
Last updated