public static String format(String pattern,Integer i,String l){
  MessageFormat mf=new MessageFormat("");
  mf.setLocale(getLocale(l));
  mf.applyPattern(pattern);
  String msg=format(mf,i);
  return msg;
}

public static String format ( String pattern , Integer i , String l ) { MessageFormat mf = new MessageFormat ( "" ) ; mf . setLocale ( getLocale ( l ) ) ; mf . applyPattern ( pattern ) ; String msg = format ( mf , i ) ; return msg ; }
formats the objects into specified message format .
