mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 14:33:06 +03:00
Improve LocalizationManager
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Globalization
|
||||
@@ -13,23 +12,26 @@ namespace MediaBrowser.Model.Globalization
|
||||
/// <summary>
|
||||
/// Gets the cultures.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{CultureDto}.</returns>
|
||||
CultureDto[] GetCultures();
|
||||
/// <returns><see cref="IEnumerable{CultureDto}" />.</returns>
|
||||
IEnumerable<CultureDto> GetCultures();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the countries.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{CountryInfo}.</returns>
|
||||
Task<CountryInfo[]> GetCountries();
|
||||
/// <returns><see cref="IEnumerable{CountryInfo}" />.</returns>
|
||||
IEnumerable<CountryInfo> GetCountries();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parental ratings.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{ParentalRating}.</returns>
|
||||
/// <returns><see cref="IEnumerable{ParentalRating}" />.</returns>
|
||||
IEnumerable<ParentalRating> GetParentalRatings();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the rating level.
|
||||
/// </summary>
|
||||
/// <param name="rating">The rating.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
/// <returns><see cref="int" /> or <c>null</c>.</returns>
|
||||
int? GetRatingLevel(string rating);
|
||||
|
||||
/// <summary>
|
||||
@@ -37,7 +39,7 @@ namespace MediaBrowser.Model.Globalization
|
||||
/// </summary>
|
||||
/// <param name="phrase">The phrase.</param>
|
||||
/// <param name="culture">The culture.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
/// <returns><see cref="string" />.</returns>
|
||||
string GetLocalizedString(string phrase, string culture);
|
||||
|
||||
/// <summary>
|
||||
@@ -50,13 +52,22 @@ namespace MediaBrowser.Model.Globalization
|
||||
/// <summary>
|
||||
/// Gets the localization options.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{LocalizatonOption}.</returns>
|
||||
LocalizationOption[] GetLocalizationOptions();
|
||||
|
||||
string NormalizeFormKD(string text);
|
||||
/// <returns><see cref="IEnumerable{LocalizatonOption}" />.</returns>
|
||||
IEnumerable<LocalizationOption> GetLocalizationOptions();
|
||||
|
||||
/// <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>
|
||||
bool HasUnicodeCategory(string value, UnicodeCategory category);
|
||||
|
||||
/// <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>
|
||||
CultureDto FindLanguageInfo(string language);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user