Class Translation

java.lang.Object
org.compiere.install.Translation
All Implemented Interfaces:
org.eclipse.equinox.app.IApplication

public class Translation extends Object implements org.eclipse.equinox.app.IApplication
Translation Table Import + Export
Version:
$Id: Translation.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
Author:
Jorg Janke
  • Field Details

  • Constructor Details

    • Translation

      public Translation(Properties ctx)
      Translation
      Parameters:
      ctx - context
    • Translation

      public Translation()
      Do not use this Constructor in normal calls. It is used e.g. by the headless call for an only-translation batch script call. author tbayen - IDEMPIERE-1554
  • Method Details

    • importTrl

      public String importTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table)
      Import Translation. Uses TranslationHandler to update translation
      Parameters:
      directory - file directory
      AD_Client_ID - only certain client if id >= 0
      AD_Language - language
      Trl_Table - table
      Returns:
      status message
    • importTrl

      public String importTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, String trxName)
      Import Translation. Uses TranslationHandler to update translation
      Parameters:
      directory - file directory
      AD_Client_ID - only certain client if id >= 0
      AD_Language - language
      Trl_Table - table
      trxName - Transaction
      Returns:
      status message
    • exportTrl

      public String exportTrl(String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized)
      Export Translation
      Parameters:
      directory - file directory
      AD_Client_ID - only certain client if id >= 0
      AD_Language - language
      Trl_Table - translation table _Trl
      onlyCentralized -
      Returns:
      status message
    • validateLanguage

      public String validateLanguage(String p_AD_Language)
       Validate Language.
        - Check if AD_Language record exists
        - Check Trl table records
        
      Parameters:
      p_AD_Language - language
      Returns:
      "" if validated - or error message
    • validateLanguage

      public String validateLanguage(String AD_Language, String trxName)
        Validate Language.
        - Check if AD_Language record exists
        - Check Trl table records
        
      Parameters:
      AD_Language - language
      trxName - transaction
      Returns:
      "" if validated - or error message
    • process

      public void process(String directory, String AD_Language, String mode)
      Process
      Parameters:
      directory - directory
      AD_Language - language
      mode - mode
    • start

      public Object start(org.eclipse.equinox.app.IApplicationContext context) throws Exception
      Launch method of the OSGi application. In pre-OSGi times commandline launching was done by a run of the main() method of Translation. This is the OSGized launch method. This class has to be mentioned in META-INF/MANIFEST.MF as an "org.eclipse.core.runtime.applications" extension. Because of that it can be called from the commandline. You should take care that the org.eclipse.equinox.event bundle is active if you run this to send events in the case something goes wrong (like a missing file etc.)
      Specified by:
      start in interface org.eclipse.equinox.app.IApplication
      Throws:
      Exception
    • stop

      public void stop()
      Specified by:
      stop in interface org.eclipse.equinox.app.IApplication