2019-01-27 02:20:05 -07:00
|
|
|
using System.Collections.Generic;
|
2019-01-13 13:02:23 -07:00
|
|
|
using System.Globalization;
|
2018-12-27 16:27:57 -07:00
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Globalization
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Interface ILocalizationManager
|
|
|
|
/// </summary>
|
|
|
|
public interface ILocalizationManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the cultures.
|
|
|
|
/// </summary>
|
2019-08-16 08:31:47 -07:00
|
|
|
/// <returns><see cref="IEnumerable{CultureDto}" />.</returns>
|
|
|
|
IEnumerable<CultureDto> GetCultures();
|
|
|
|
|
2018-12-27 16:27:57 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the countries.
|
|
|
|
/// </summary>
|
2019-08-16 08:31:47 -07:00
|
|
|
/// <returns><see cref="IEnumerable{CountryInfo}" />.</returns>
|
|
|
|
IEnumerable<CountryInfo> GetCountries();
|
|
|
|
|
2018-12-27 16:27:57 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the parental ratings.
|
|
|
|
/// </summary>
|
2019-08-16 08:31:47 -07:00
|
|
|
/// <returns><see cref="IEnumerable{ParentalRating}" />.</returns>
|
2019-01-27 02:20:05 -07:00
|
|
|
IEnumerable<ParentalRating> GetParentalRatings();
|
2019-08-16 08:31:47 -07:00
|
|
|
|
2018-12-27 16:27:57 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the rating level.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="rating">The rating.</param>
|
2019-08-16 08:31:47 -07:00
|
|
|
/// <returns><see cref="int" /> or <c>null</c>.</returns>
|
2018-12-27 16:27:57 -07: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 08:31:47 -07:00
|
|
|
/// <returns><see cref="string" />.</returns>
|
2018-12-27 16:27:57 -07: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 08:31:47 -07:00
|
|
|
/// <returns><see cref="IEnumerable{LocalizatonOption}" />.</returns>
|
|
|
|
IEnumerable<LocalizationOption> GetLocalizationOptions();
|
2018-12-27 16:27:57 -07:00
|
|
|
|
2019-08-16 08:31:47 -07: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-27 16:27:57 -07:00
|
|
|
bool HasUnicodeCategory(string value, UnicodeCategory category);
|
|
|
|
|
2019-08-16 08:31:47 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Returns the correct <see cref="Cultureinfo" /> for the given language.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="language">The language.</param>
|
|
|
|
/// <returns>The correct <see cref="Cultureinfo" /> for the given language.</returns>
|
2018-12-27 16:27:57 -07:00
|
|
|
CultureDto FindLanguageInfo(string language);
|
|
|
|
}
|
|
|
|
}
|