public static string GetCustomMailTip(RecipientData recipientData, int traceId, int lcid)
        {
            MailTipsUtility.GetMailTipsTracer.TraceFunction((long)traceId, "Entering GetBestCustomMailTip");
            CultureInfo cultureInfo = null;

            try
            {
                cultureInfo = new CultureInfo(lcid);
            }
            catch (ArgumentException)
            {
                MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip - invalid culture, returning default");
                return(ADRecipient.DefaultMailTipGetter(recipientData.MailTipTranslations) as string);
            }
            object mailTipTranslations = recipientData.MailTipTranslations;

            if (mailTipTranslations == null)
            {
                return(null);
            }
            IList <string> list = (IList <string>)mailTipTranslations;

            if (list.Count == 0)
            {
                MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip - no values, returning null");
                return(null);
            }
            string result;

            if (list.Count != 1)
            {
                for (int i = 0; i < 10; i++)
                {
                    string name = cultureInfo.Name;
                    MailTipsUtility.GetMailTipsTracer.TraceDebug <string>((long)traceId, "Checking for custom MailTip for {0}", name);
                    if (MailTipsUtility.TryGetTranslation(list, name, out result))
                    {
                        MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip with match");
                        return(result);
                    }
                    if (cultureInfo == CultureInfo.InvariantCulture)
                    {
                        MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip with default");
                        return(ADRecipient.DefaultMailTipGetter(recipientData.MailTipTranslations) as string);
                    }
                    cultureInfo = cultureInfo.Parent;
                }
                return(ADRecipient.DefaultMailTipGetter(recipientData.MailTipTranslations) as string);
            }
            string text;

            if (ADRecipient.TryGetMailTipParts(list[0], out text, out result))
            {
                MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip - returning the sole value");
                return(result);
            }
            MailTipsUtility.GetMailTipsTracer.TraceDebug((long)traceId, "Exiting GetBestCustomMailTip - sole value corrupt, returning null");
            return(null);
        }