Exemple #1
0
 /// <inheritdoc/>
 public virtual IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures = false) => InnerLocalizer.GetAllStrings(includeParentCultures);
 public IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures)
 {
     return(_localizer.GetAllStrings(includeParentCultures));
 }
Exemple #3
0
        public ActionResult GetClientTranslations()
        {
            var res = new Dictionary <string, string>();

            return(Ok(stringLocalizer.GetAllStrings().ToDictionary(s => s.Name, s => s.Value)));
        }
        public IActionResult GetTranslation()
        {
            var strings = _localizer.GetAllStrings().ToDictionary(x => x.Name, x => x.Value);

            return(Json(strings));
        }
 public IEnumerable <LocalizedString> GetAllStrings(bool includeAncestorCultures) => localizer.GetAllStrings(includeAncestorCultures);
 public static IEnumerable <string> GetAllStringsValues(this IStringLocalizer stringLocalizer, bool includeParentCultures = true)
 => stringLocalizer.GetAllStrings(includeParentCultures).Select(x => x.Value).ToArray();
 /// <summary>
 /// Gets all string resources including those for ancestor cultures.
 /// </summary>
 /// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param>
 /// <returns>The string resources.</returns>
 public static IEnumerable <LocalizedString> GetAllStrings([NotNull] this IStringLocalizer stringLocalizer) =>
 stringLocalizer.GetAllStrings(includeAncestorCultures: true);
 public object GetAllLocalizerStrings()
 {
     return(_localizer.GetAllStrings());
 }
        public IActionResult AllMessages()
        {
            string strings = string.Join(", ", _messageLocalizer.GetAllStrings().Select(x => (string)x));

            return(Content(strings));
        }
Exemple #10
0
 public IEnumerable <LocalizedString> GetAllStrings() =>
 _stringLocalizer.GetAllStrings(CultureInfo.CurrentUICulture.Equals(new CultureInfo(RegionType.EN.ToString())));
        public IActionResult AllItems()
        {
            string strings = string.Join(", ", _itemLocalizer.GetAllStrings().Select(x => (string)x));

            return(Content(strings));
        }
Exemple #12
0
 public IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures) =>
 _stringLocalizer.GetAllStrings(includeParentCultures);
 private StringLocalizerWithCache(IStringLocalizer source)
 {
     _cache = source.GetAllStrings(/*true*/).ToDictionary(i => i.Name, i => i.Value);
 }
Exemple #14
0
        public IActionResult Index()
        {
            var locStrings = _stringLocalizer.GetAllStrings();

            return(Json(locStrings));
        }
 public IActionResult Get()
 {
     return(Ok(localizer.GetAllStrings().Select(e => new { e.Name, e.Value })));
 }