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