2
0

ILocalizationManager.cs 2.6 KB

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