public String importTrl(String directory,int AD_Client_ID,String AD_Language,String Trl_Table){
  String fileName=directory + File.separator + Trl_Table+ "_"+ AD_Language+ ".xml";
  log.info(fileName);
  File in=new File(fileName);
  if (!in.exists()) {
    String msg="File does not exist: " + fileName;
    log.log(Level.SEVERE,msg);
    return msg;
  }
  try {
    TranslationHandler handler=new TranslationHandler(AD_Client_ID);
    SAXParserFactory factory=SAXParserFactory.newInstance();
    SAXParser parser=factory.newSAXParser();
    parser.parse(in,handler);
    log.info("Updated=" + handler.getUpdateCount());
    return Msg.getMsg(m_ctx,"Updated") + "=" + handler.getUpdateCount();
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"importTrl",e);
    return e.toString();
  }
}

public String importTrl ( String directory , int AD_Client_ID , String AD_Language , String Trl_Table ) { String fileName = directory + File . separator + Trl_Table + "_" + AD_Language + ".xml" ; log . info ( fileName ) ; File in = new File ( fileName ) ; if ( ! in . exists ( ) ) { String msg = "File does not exist: " + fileName ; log . log ( Level . SEVERE , msg ) ; return msg ; } try { TranslationHandler handler = new TranslationHandler ( AD_Client_ID ) ; SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; SAXParser parser = factory . newSAXParser ( ) ; parser . parse ( in , handler ) ; log . info ( "Updated=" + handler . getUpdateCount ( ) ) ; return Msg . getMsg ( m_ctx , "Updated" ) + "=" + handler . getUpdateCount ( ) ; } catch ( Exception e ) { log . log ( Level . SEVERE , "importTrl" , e ) ; return e . toString ( ) ; } }
import translation . uses translationhandler to update translation
