internationalization library

Karee Internationalization.

Karee provides this library as a simplest way to work with internationalization. This lib gives you translation support trough the string extension defined and named StringTranslator by adding two methods StringTranslator.translate and StringTranslator.translateWithParams.

To define you translation dictionary, get open file in {@PROJECT_DIR@/resources/i18n/locale.json}.

Karee Internationalization also provides a simplest way to change language in your application. You need to call KareeInternationalization.changeLanguage with Locale that matches with your dictionary files.

eg:


void updateUserLanguage(Locale locale){

  // Applying change for future connexion

  userService.changePreferedLanguage(locale);

  //
  // Applying change for in all the application.
  // Precondition is that newLang is supportedLocal in your KareeMaterialApp

  KareeInternationalization.changeLanguage(newLang);

}

Classes

AppLanguage
AppLanguage: defines the model of current language for internationalization.
AppLocalization
AppLocalization
KareeInternationalization
KareeInternationalization: Class that provides internationalization for your Karee applications.

Extensions

AppLocalizationExtension on AppLocalization
AppLocalizationExtension: Provides a set of methods compatible to AppLocalization objects, and hence can be applied on them.
StringTranslator on String
Extension that applies text translation in karee.