mayr_i18n 1.0.0
mayr_i18n: ^1.0.0 copied to clipboard
A Dart-based, JSON-powered internationalization (i18n) library.
1.0.0 - 2025-10-11 #
π Initial Release #
Core Features
- β MayrI18n Singleton Manager - Central translation management system
- β JSON-based Translations - Simple, human-readable translation files
- β
Nested Key Support - Organize translations with dot notation (e.g.,
app.auth.login) - β
Dynamic Placeholder Replacement - Use
{name}placeholders in translations - β
String Extension - Convenient
.tr()method for cleaner code - β Multi-locale Support - Load and switch between multiple languages at runtime
- β
Configuration System - Configure via
pubspec.yamlor.envfiles
CLI Tools
- β verify - Check for missing keys across translation files
- β sync - Automatically add missing keys with empty placeholders
- β audit - Scan codebase for unused or missing translation keys
- β create - Generate new translation files with proper structure
Developer Experience
- β Comprehensive Tests - 17 tests covering all functionality
- β Clean API - Simple, intuitive methods following Dart conventions
- β Colorized CLI Output - Beautiful, emoji-enhanced console messages
- β Type-safe - Full Dart type safety with null safety support
- β Well-documented - Extensive inline documentation and examples
Examples
- Basic usage example
- Comprehensive feature demonstration
- CLI command demonstrations
Software Engineering Principles
- KISS - Simple, straightforward API
- DRY - No code duplication, reusable utilities
- YAGNI - Only essential features, no bloat
- Single Responsibility - Each class has one clear purpose
- Modularization - Clean separation of concerns
Dependencies #
yaml: ^3.1.2- Parse pubspec.yaml configurationpath: ^1.9.0- Cross-platform path handlingargs: ^2.5.0- Command-line argument parsingio: ^1.0.4- File I/O operations