Example #1
0
        /// <summary>
        /// Gets the static translation for.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns>The List of <see cref="Mvc.RoadsServiceClient.StaticTranslationData"/>.</returns>
        public static List<StaticTranslationData> GetStaticTranslationFor(IRoadsService client, string key)
        {
            var languages = client.GetAllLanguages();

                return client.GetStaticTranslationData(key).Select(s => new StaticTranslationData
                    {
                        EnumKey = s.EnumKey,
                        LanguageId = s.LanguageId,
                        Value = s.Value,
                        StaticTranslationId = s.StaticTranslationId,
                        Language = languages.FirstOrDefault(l => l.LanguageId == s.LanguageId)
                    })
                    .ToList();
        }
Example #2
0
        /// <summary>
        /// Dynamics the translation for.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns>The List of <see cref="Mvc.RoadsServiceClient.DynamicTranslationsData"/>.</returns>
        public static List<DynamicTranslationsData> GetDynamicTranslationFor(IRoadsService client, string key)
        {
            var languages = client.GetAllLanguages();

                return client.GetDynamicTranslationData(key).Select(s => new DynamicTranslationsData
                    {
                        DynamicKey = s.DynamicKey,
                        LanguageId = s.LanguageId,
                        Value = s.Value,
                        DynamicObjectId = s.DynamicObjectId,
                        Lenguage = languages.FirstOrDefault(l => l.LanguageId == s.LanguageId)
                    }).ToList();
        }
Example #3
0
 /// <summary>
 /// Gets the languages.
 /// </summary>
 /// <returns>The list for <see cref="Mvc.RoadsServiceClient.LanguageData"/>.</returns>
 public static List<LanguageData> GetLanguages(IRoadsService client)
 {
     return client.GetAllLanguages().ToList();
 }
Example #4
0
        /// <summary>
        /// Gets all available languages.
        /// </summary>
        /// <returns>The List of <see cref="Language"/>.</returns>
        public static List<Language> GetAllAvailableLanguage(IRoadsService client)
        {
            var langListFromWcf = client.GetAllLanguages();

            return langListFromWcf.Select(lang => new Language
                {
                    LanguageId = lang.LanguageId,
                    Name = lang.Name,
                    IsDefault = lang.IsDefault
                }).ToList();
        }