2
0

ILocalizationManager.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System.Collections.Generic;
  2. using MediaBrowser.Model.Entities;
  3. namespace MediaBrowser.Model.Globalization
  4. {
  5. /// <summary>
  6. /// Interface ILocalizationManager.
  7. /// </summary>
  8. public interface ILocalizationManager
  9. {
  10. /// <summary>
  11. /// Gets the cultures.
  12. /// </summary>
  13. /// <returns><see cref="IEnumerable{CultureDto}" />.</returns>
  14. IEnumerable<CultureDto> GetCultures();
  15. /// <summary>
  16. /// Gets the countries.
  17. /// </summary>
  18. /// <returns><see cref="IEnumerable{CountryInfo}" />.</returns>
  19. IEnumerable<CountryInfo> GetCountries();
  20. /// <summary>
  21. /// Gets the parental ratings.
  22. /// </summary>
  23. /// <returns><see cref="IEnumerable{ParentalRating}" />.</returns>
  24. IEnumerable<ParentalRating> GetParentalRatings();
  25. /// <summary>
  26. /// Gets the rating level.
  27. /// </summary>
  28. /// <param name="rating">The rating.</param>
  29. /// <returns><see cref="int" /> or <c>null</c>.</returns>
  30. int? GetRatingLevel(string rating);
  31. /// <summary>
  32. /// Gets the localized string.
  33. /// </summary>
  34. /// <param name="phrase">The phrase.</param>
  35. /// <param name="culture">The culture.</param>
  36. /// <returns><see cref="string" />.</returns>
  37. string GetLocalizedString(string phrase, string culture);
  38. /// <summary>
  39. /// Gets the localized string.
  40. /// </summary>
  41. /// <param name="phrase">The phrase.</param>
  42. /// <returns>System.String.</returns>
  43. string GetLocalizedString(string phrase);
  44. /// <summary>
  45. /// Gets the localization options.
  46. /// </summary>
  47. /// <returns><see cref="IEnumerable{LocalizatonOption}" />.</returns>
  48. IEnumerable<LocalizationOption> GetLocalizationOptions();
  49. /// <summary>
  50. /// Returns the correct <see cref="CultureDto" /> for the given language.
  51. /// </summary>
  52. /// <param name="language">The language.</param>
  53. /// <returns>The correct <see cref="CultureDto" /> for the given language.</returns>
  54. CultureDto? FindLanguageInfo(string language);
  55. }
  56. }