2019-01-27 10:20:05 +01:00
|
|
|
using System.Collections.Generic;
|
2019-01-13 21:02:23 +01:00
|
|
|
using System.Globalization;
|
2018-12-28 00:27:57 +01:00
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Globalization
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-02-04 01:49:27 +01:00
|
|
|
/// Interface ILocalizationManager.
|
2018-12-28 00:27:57 +01:00
|
|
|
/// </summary>
|
|
|
|
public interface ILocalizationManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the cultures.
|
|
|
|
/// </summary>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="IEnumerable{CultureDto}" />.</returns>
|
|
|
|
IEnumerable<CultureDto> GetCultures();
|
|
|
|
|
2018-12-28 00:27:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the countries.
|
|
|
|
/// </summary>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="IEnumerable{CountryInfo}" />.</returns>
|
|
|
|
IEnumerable<CountryInfo> GetCountries();
|
|
|
|
|
2018-12-28 00:27:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the parental ratings.
|
|
|
|
/// </summary>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="IEnumerable{ParentalRating}" />.</returns>
|
2019-01-27 10:20:05 +01:00
|
|
|
IEnumerable<ParentalRating> GetParentalRatings();
|
2019-08-16 17:31:47 +02:00
|
|
|
|
2018-12-28 00:27:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the rating level.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="rating">The rating.</param>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="int" /> or <c>null</c>.</returns>
|
2018-12-28 00:27:57 +01:00
|
|
|
int? GetRatingLevel(string rating);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the localized string.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="phrase">The phrase.</param>
|
|
|
|
/// <param name="culture">The culture.</param>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="string" />.</returns>
|
2018-12-28 00:27:57 +01:00
|
|
|
string GetLocalizedString(string phrase, string culture);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the localized string.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="phrase">The phrase.</param>
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
string GetLocalizedString(string phrase);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the localization options.
|
|
|
|
/// </summary>
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <returns><see cref="IEnumerable{LocalizatonOption}" />.</returns>
|
|
|
|
IEnumerable<LocalizationOption> GetLocalizationOptions();
|
2018-12-28 00:27:57 +01:00
|
|
|
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <summary>
|
|
|
|
/// Checks if the string contains a character with the specified unicode category.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="value">The string.</param>
|
|
|
|
/// <param name="category">The unicode category.</param>
|
|
|
|
/// <returns>Wether or not the string contains a character with the specified unicode category.</returns>
|
2018-12-28 00:27:57 +01:00
|
|
|
bool HasUnicodeCategory(string value, UnicodeCategory category);
|
|
|
|
|
2019-08-16 17:31:47 +02:00
|
|
|
/// <summary>
|
2019-11-03 15:52:10 +01:00
|
|
|
/// Returns the correct <see cref="CultureInfo" /> for the given language.
|
2019-08-16 17:31:47 +02:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="language">The language.</param>
|
2019-11-03 15:52:10 +01:00
|
|
|
/// <returns>The correct <see cref="CultureInfo" /> for the given language.</returns>
|
2018-12-28 00:27:57 +01:00
|
|
|
CultureDto FindLanguageInfo(string language);
|
|
|
|
}
|
|
|
|
}
|