ILocalizationDictionary.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections.Generic;
  2. using System.Globalization;
  3. namespace Abp.Localization.Dictionaries
  4. {
  5. /// <summary>
  6. /// Represents a dictionary that is used to find a localized string.
  7. /// </summary>
  8. public interface ILocalizationDictionary
  9. {
  10. /// <summary>
  11. /// Culture of the dictionary.
  12. /// </summary>
  13. CultureInfo CultureInfo { get; }
  14. /// <summary>
  15. /// Gets/sets a string for this dictionary with given name (key).
  16. /// </summary>
  17. /// <param name="name">Name to get/set</param>
  18. string this[string name] { get; set; }
  19. /// <summary>
  20. /// Gets a <see cref="LocalizedString"/> for given <paramref name="name"/>.
  21. /// </summary>
  22. /// <param name="name">Name (key) to get localized string</param>
  23. /// <returns>The localized string or null if not found in this dictionary</returns>
  24. LocalizedString GetOrNull(string name);
  25. /// <summary>
  26. /// Gets a list of all strings in this dictionary.
  27. /// </summary>
  28. /// <returns>List of all <see cref="LocalizedString"/> object</returns>
  29. IReadOnlyList<LocalizedString> GetAllStrings();
  30. }
  31. }