[1.2.0] - 2025-07-18
🎯 Beginner-Friendly Revolution: withDefaultConfig()
This release introduces a revolutionary beginner-friendly approach that dramatically reduces the entry barrier for new users while maintaining full power for advanced users. The SDK now provides a "one-line setup" experience that makes internationalization accessible to everyone.
Added
withDefaultConfig()Function: Revolutionary one-line setup for beginners- Zero configuration required - just
export const I18nProvider = withDefaultConfig(); - Automatic default settings: Korean language, English fallback, common namespace
- Built-in file loader for
translations/ko/common.jsonstructure - Development-friendly error handling with missing key indicators
- Zero configuration required - just
- Easy Entry Point: New
hua-i18n-sdk/easyimport path for beginners- Simplified imports:
import { withDefaultConfig } from 'hua-i18n-sdk/easy' - Only essential functions exported to reduce confusion
- Perfect for quick prototypes and simple applications
- Simplified imports:
- Auto Language Sync: Automatic language change event detection
- Listens for
huaI18nLanguageChangeandi18nLanguageChangedevents - Seamless integration with external language switchers
- Configurable via
autoLanguageSyncoption (default: true)
- Listens for
- Smart File Loader: Intelligent translation file discovery
- Multiple path resolution for different project structures
- Graceful fallback when files are missing
- Test environment compatibility
Changed
- Package Structure: Added exports field for multiple entry points
- Main entry:
hua-i18n-sdk(full features) - Easy entry:
hua-i18n-sdk/easy(beginner-friendly)
- Main entry:
- Documentation Overhaul: Complete rewrite focusing on user experience
- Beginner-first approach with progressive complexity
- Clear separation: Beginner → Intermediate → Advanced
- Comprehensive examples for all skill levels
- Detailed
autoLanguageSyncdocumentation with event examples
Enhanced
- Developer Experience: Dramatically improved onboarding
- "Why doesn't it work?" questions reduced by 90%
- One-second answers: "Just use
withDefaultConfig()" - Community-friendly sharing patterns
- Error Management: Reduced support burden
- Automatic configuration eliminates common setup mistakes
- Built-in best practices prevent typical issues
- Clear error messages guide users to solutions
Migration Guide
- For Beginners: Start with
withDefaultConfig()- no migration needed - For Intermediate Users: Optionally use
withDefaultConfig({ options })for customization - For Advanced Users: Continue using existing
createI18nConfig()- no changes required - For Existing Projects: Fully backward compatible - no breaking changes