intl_messages 1.0.0 copy "intl_messages: ^1.0.0" to clipboard
intl_messages: ^1.0.0 copied to clipboard

outdated

Simple and easy internationalization and localization messages.

intl_messages #

A Simple and easy library for Message Internationalization and Localization (I18N).

Main features:

  • Structure of messages by package/module.

  • Dynamic load of assets/files of messages.

  • Global notification of locale change and registration/discovery of localized messages.

Usage #

A simple usage example:

import 'package:intl_messages/intl_messages.dart';

main() async {

    var messages = IntlMessages.package("demo");
    
    IntlResourceDiscover discover = IntlResourceDiscover("assets/msgs-", ".intl") ;
    await messages.registerResourceDiscover(discover) ; // Default locale: 'en'. Discovered: assets/msgs-en.intl
    
    MessageBuilder msgHello = messages.msg("hello") ;
    
    print( msgHello.build() ) ; // Hello world!
    
    await messages.setLocale( 'fr' ) ; ; // Locale set to: 'fr'. Discovered: assets/msgs-fr.intl
    
    print( msgHello.build() ) ; // Bonjour le monde!

}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

4
likes
0
pub points
79%
popularity

Publisher

unverified uploader

Simple and easy internationalization and localization messages.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

enum_to_string, intl, resource, swiss_knife

More

Packages that depend on intl_messages