Package org.compiere.util

Examples of org.compiere.util.Language


    m_connectionOK = tryConnection();

    if (m_connectionOK)     
    {
      //  Verify Language & Load Msg
      Language l = Language.getLoginLanguage();
      Env.verifyLanguage (m_ctx, l);
      Env.setContext(m_ctx, Env.LANGUAGE, l.getAD_Language());
      Msg.getMsg(m_ctx, "0");
     
      //  Migration
      MSystem system = MSystem.get(m_ctx);
      if (system.isJustMigrated())
View Full Code Here


   */
  private void languageComboChanged ()
  {
    String langName = (String)languageCombo.getSelectedItem();
  //  log.info( "Language: " + langName);
    Language language = Language.getLanguage(langName);
    Language.setLoginLanguage(language);
    Env.setContext(m_ctx, Env.LANGUAGE, language.getAD_Language());

    //  Locales
    Locale loc = language.getLocale();
    Locale.setDefault(loc);
    this.setLocale(loc);
    res = ResourceBundle.getBundle(RESOURCE, loc);
    //
    this.setTitle(res.getString("Login"));
View Full Code Here

    m_bankBalance = bi.Balance;
   
    ArrayList<ValueNamePair> data = new ArrayList<ValueNamePair>();
   
    int AD_Reference_ID = 195//  MLookupInfo.getAD_Reference_ID("All_Payment Rule");
    Language language = Env.getLanguage(Env.getCtx());
    MLookupInfo info = MLookupFactory.getLookup_List(language, AD_Reference_ID);
    String sql = info.Query.substring(0, info.Query.indexOf(" ORDER BY"))
      + " AND " + info.KeyColumn
      + " IN (SELECT PaymentRule FROM C_BankAccountDoc WHERE C_BankAccount_ID=?) "
      + info.Query.substring(info.Query.indexOf(" ORDER BY"));
View Full Code Here

   *   Fill Tree Combo
   */
  private void preInit() throws Exception
  {
    Properties ctx = getCtx();
    Language language = Language.getLoginLanguage(); // Base Language
    MLookup m_fieldProduct = MLookupFactory.get(ctx, m_WindowNo,
        MColumn.getColumn_ID(MProduct.Table_Name, "M_Product_ID"),
        DisplayType.Search, language, MProduct.COLUMNNAME_M_Product_ID, 0, false,
        " M_Product.IsSummary = 'N'");
    fieldProduct = new VLookup ("M_Product_ID", false, false, true,  m_fieldProduct) {
View Full Code Here

    if (e.getID() == WindowEvent.WINDOW_CLOSED && m_reportEngine != null)
    {
      setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      log.info("Re-read PrintFormat");
      int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID();
      Language language = m_reportEngine.getPrintFormat().getLanguage();
      MPrintFormat pf = MPrintFormat.get (Env.getCtx(), AD_PrintFormat_ID, true);
      pf.setLanguage (language);    //  needs to be re-set - otherwise viewer will be blank
      pf.setTranslationLanguage (language);
      m_reportEngine.setPrintFormat(pf);
      revalidate();
View Full Code Here

        int C_Invoice_ID = rs.getInt(1);
        if (C_Invoice_ID == old_C_Invoice_ID//  multiple pf records
          continue;
        old_C_Invoice_ID = C_Invoice_ID;
        //  Set Language when enabled
        Language language = Language.getLoginLanguage();    //  Base Language
        String AD_Language = rs.getString(2);
        if (AD_Language != null && "Y".equals(rs.getString(3)))
          language = Language.getLanguage(AD_Language);
        //
        int AD_PrintFormat_ID = rs.getInt(4);
View Full Code Here

   */
  public boolean createHTML (File file, boolean onlyTable, Language language, IHTMLExtension extension)
  {
    try
    {
      Language lang = language;
      if (lang == null)
        lang = Language.getLoginLanguage();
      Writer fw = new OutputStreamWriter(new FileOutputStream(file, false), Ini.getCharset()); // teo_sarca: save using adempiere charset [ 1658127 ]
      return createHTML (new BufferedWriter(fw), onlyTable, lang, extension);
    }
View Full Code Here

    String DocumentNo = null;
    int copies = 1;

    //  Language
    MClient client = MClient.get(ctx);
    Language language = client.getLanguage()
    //  Get Document Info
    String sql = null;
    if (type == CHECK)
      sql = "SELECT bad.Check_PrintFormat_ID,"                //  1
        + "  c.IsMultiLingualDocument,bp.AD_Language,bp.C_BPartner_ID,d.DocumentNo "    //  2..5
View Full Code Here

TOP

Related Classes of org.compiere.util.Language

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.