intl_message 0.3.2+5 intl_message: ^0.3.2+5 copied to clipboard
Parses and formats ICU Message strings. Formats strings in multiple languages.
import 'package:intl/date_symbol_data_local.dart';
import 'package:intl_message/intl_message.dart';
void main() {
initializeDateFormatting();
var msg = IntlMessage('It is now {now, date, long}');
var str = msg.format({'now': DateTime.now()});
print(str);
msg = IntlMessage({
'nl': 'Toon is geboren op {birthday, date, long}',
'en': 'Toon was born on {birthday, date, long}',
});
IntlMessage.withLocale('nl', () {
var str = msg.format({'birthday': DateTime(2008, 8, 16)});
print(str);
});
}