I18n Package Entry Point (index.ts
)
This file serves as the main entry point for the @sodacore/core
i18n (internationalization) package. It re-exports all primary modules, services, providers, and transforms, making them available for import from a single location. The default export is the I18nPlugin
for easy integration with the Sodacore application.
Features
- Centralized Exports: Exposes all i18n-related services, providers, and transforms for easy import.
- Default Plugin Export: Exports
I18nPlugin
as the default, enabling quick registration with the Sodacore application. - Service and Provider Exports: Exports the main i18n service and provider for translation and localization.
- Transform Export: Exports a translation transform for use in templates or pipelines.
Usage
Import i18n features directly from the package root:
typescript
import I18nPlugin, {
I18nService,
I18nProvider,
TranslateTransform,
} from '@sodacore/core/i18n';
Register the plugin with your Sodacore application:
typescript
import I18nPlugin from '@sodacore/core/i18n';
app.register(I18nPlugin);
API
Default Export
- I18nPlugin The main plugin class for integrating internationalization with the Sodacore application.
Named Exports
I18nService: Core service for managing translations and locale data.
I18nProvider: Provider for dependency injection and translation utilities.
TranslateTransform: Transform for translating strings in templates or pipelines.
Notes
- This file is intended to be the single import point for all i18n features in the Sodacore ecosystem.
- All exports are organized for clarity and ease of use, supporting both application and library development.