-
-
Notifications
You must be signed in to change notification settings - Fork 381
Open
Labels
Status: ProposalRequest for commentsRequest for comments
Description
Clear and concise description of the problem
With nested locale files, developers must redundantly write prefixes such as t('homePage.title'), t('homePage.welcome'), etc., inside the HomePage component.
Suggested solution
Add a scope option to useI18n so developers can load a subset of the JSON and avoid redundancy:
const { t } = useI18n({ scope: 'homePage' });
t('title'); // resolves to homePage.title
t('welcome'); // resolves to homePage.welcomeBenefit
Removes repetitive key prefixes, making code cleaner and easier to maintain.
Alternative
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
Status: ProposalRequest for commentsRequest for comments