jellyfin/MediaBrowser.Controller/Localization/ILocalizationManager.cs

73 lines
2.5 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
2014-03-30 18:00:47 -07:00
using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Localization
{
/// <summary>
/// Interface ILocalizationManager
/// </summary>
public interface ILocalizationManager
{
/// <summary>
/// Gets the cultures.
/// </summary>
/// <returns>IEnumerable{CultureDto}.</returns>
IEnumerable<CultureDto> GetCultures();
/// <summary>
/// Gets the countries.
/// </summary>
/// <returns>IEnumerable{CountryInfo}.</returns>
IEnumerable<CountryInfo> GetCountries();
/// <summary>
/// Gets the parental ratings.
/// </summary>
/// <returns>IEnumerable{ParentalRating}.</returns>
IEnumerable<ParentalRating> GetParentalRatings();
/// <summary>
/// Gets the rating level.
/// </summary>
/// <param name="rating">The rating.</param>
/// <returns>System.Int32.</returns>
int? GetRatingLevel(string rating);
2014-03-30 18:00:47 -07:00
/// <summary>
/// Gets the localized string.
/// </summary>
/// <param name="phrase">The phrase.</param>
/// <param name="culture">The culture.</param>
/// <returns>System.String.</returns>
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>
/// Localizes the document.
/// </summary>
/// <param name="document">The document.</param>
/// <param name="culture">The culture.</param>
/// <param name="tokenBuilder">The token builder.</param>
/// <returns>System.String.</returns>
string LocalizeDocument(string document, string culture, Func<string, string> tokenBuilder);
/// <summary>
/// Gets the localization options.
/// </summary>
/// <returns>IEnumerable{LocalizatonOption}.</returns>
IEnumerable<LocalizatonOption> GetLocalizationOptions();
2014-03-30 19:33:10 -07:00
/// <summary>
/// Gets the java script localization dictionary.
/// </summary>
/// <param name="culture">The culture.</param>
/// <returns>Dictionary{System.StringSystem.String}.</returns>
Dictionary<string, string> GetJavaScriptLocalizationDictionary(string culture);
}
}