Ejemplo n.º 1
0
 /// <summary>
 /// Equals.
 /// Two languages are equal, if they have the same AD_Language
 /// </summary>
 /// <param name="obj">compare</param>
 /// <returns>true if AD_Language is the same</returns>
 public override bool Equals(Object obj)
 {
     if (obj.GetType() == typeof(Language))
     {
         Language cmp = (Language)obj;
         if (cmp.GetAD_Language().Equals(_AD_Language))
         {
             return(true);
         }
     }
     return(false);
 }       //	equals
Ejemplo n.º 2
0
        }       //	setIsTableBased

        /// <summary>
        /// Set Translation View Language.
        /// </summary>
        /// <param name="language">language (checked for base language)</param>
        public void SetTranslationLanguage(VAdvantage.Login.Language language)
        {
            if (language == null || language.IsBaseLanguage())
            {
                _translationViewLanguage = null;
            }
            else
            {
                _translationViewLanguage = language.GetAD_Language();
                _language = language;
            }
        }       //	setTranslationLanguage
Ejemplo n.º 3
0
        }   //  getAD_Language

        /// <summary>
        /// Get Supported Language
        /// </summary>
        /// <param name="culture">Locale</param>
        /// <returns>AD_Language</returns>
        public static String GetAD_Language(System.Globalization.CultureInfo culture)
        {
            if (culture != null)
            {
                for (int i = 0; i < _languages.Length; i++)
                {
                    if (culture.Equals(_languages[i].GetCulture()))
                    {
                        return(_languages[i].GetAD_Language());
                    }
                }
            }
            return(_loginLanguage.GetAD_Language());
        }   //  getLocale