-
-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Clear and concise description of the problem
Currently, nestjs-i18n allows interpolation of variables (e.g. {{field}}) but doesn’t provide built-in support for simple text transformations such as uppercase, lowercase, or capitalize within translation files.
This makes it harder to handle case-sensitive requirements directly in the translation strings (e.g., UI titles, field labels) and forces developers to apply manual post-processing after calling i18n.translate().
Suggested solution
Example translation file:
{
"greeting": "Hello, {{name}}!"
}Expected usage in code:
await this.i18n.translate('shared.greeting', {
lang: 'en',
args: { name: 'john doe' },
transform: "uppercase"
});
// Potentially with modifier → "Hello, JOHN DOE!"Alternative
Maybe can add uppsercase on translate file.
{
"greeting": "Hello, {{name | uppercase}}!"
}Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request