jellyfin/MediaBrowser.Model/Globalization/ILocalizationManager.cs

66 lines
2.3 KiB
C#
Raw Normal View History

using System.Collections.Generic;
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>
2023-03-09 08:13:57 -05:00
/// <param name="countryCode">The optional two letter ISO language string.</param>
2019-08-16 11:31:47 -04:00
/// <returns><see cref="int" /> or <c>null</c>.</returns>
2023-03-09 08:13:57 -05:00
int? GetRatingLevel(string rating, string? countryCode = null);
2018-12-27 18:27:57 -05:00
/// <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>
2021-09-26 10:14:36 -04:00
/// Returns the correct <see cref="CultureDto" /> for the given language.
2019-08-16 11:31:47 -04:00
/// </summary>
/// <param name="language">The language.</param>
2021-09-26 10:14:36 -04:00
/// <returns>The correct <see cref="CultureDto" /> for the given language.</returns>
2021-08-15 11:20:07 -04:00
CultureDto? FindLanguageInfo(string language);
2018-12-27 18:27:57 -05:00
}
}