Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ideal_iso639LanguageCode">e.g. "en" or "fr"</param>
        /// <returns></returns>
        public string GetSummaryParagraph(string ideal_iso639LanguageCode)
        {
            var b = new StringBuilder();

            b.AppendLine("Creator: " + Creator);
            b.AppendLine(CopyrightNotice);
            if (!string.IsNullOrEmpty(CollectionName))
            {
                b.AppendLine(CollectionName);
            }
            if (!string.IsNullOrEmpty(CollectionUri))
            {
                b.AppendLine(CollectionUri);
            }
            if (!string.IsNullOrEmpty(License.Url))
            {
                b.AppendLine(License.Url);
            }
            b.AppendLine(License.GetDescription(ideal_iso639LanguageCode));
            return(b.ToString());
        }
Esempio n. 2
0
        /// <summary>
        /// Gets a text combining the creator, copyright, and license
        /// </summary>
        /// <remarks>It's possible to get parts in multiple languages if some parts have been localized, and other parts haven't</remarks>
        /// <param name="languagePriorityIds">The summary will be in the first language available.</param>
        /// <param name="idOfLanguageUsed"></param>
        /// <returns></returns>
        public string GetSummaryParagraph(IEnumerable <string> languagePriorityIds, out string idOfLanguageUsed)
        {
            var    b            = new StringBuilder();
            string creatorLabel = LocalizationManager.GetString("MetadataDisplay.CreatorLabel", "Creator");

            b.AppendLine(creatorLabel + ": " + Creator);
            b.AppendLine(CopyrightNotice);
            if (!string.IsNullOrEmpty(CollectionName))
            {
                b.AppendLine(CollectionName);
            }
            if (!string.IsNullOrEmpty(CollectionUri))
            {
                b.AppendLine(CollectionUri);
            }
            if (!string.IsNullOrEmpty(License.Url))
            {
                b.AppendLine(License.Url);
            }
            b.AppendLine(License.GetDescription(languagePriorityIds, out idOfLanguageUsed));
            return(b.ToString());
        }