jellyfin/MediaBrowser.Model/Globalization/ILocalizationManager.cs

75 lines
2.6 KiB
C#
Raw Normal View History

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