/// Internationalization utilities /// /// @author Pierre HUBERT /// Translate a string /// /// Translate a given [string] into the current language, if available /// /// Then apply the list of [args] to the string, each argument name is /// surrounded by '%' String tr(String string, {Map args}) { //TODO : create translation system //Apply arguments if(args != null) args.forEach((key, value) => string = string.replaceAll("%$key%", value)); return string; }