mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 04:48:27 +01:00
Add GPL modules
This commit is contained in:
33
MediaBrowser.Model/Globalization/CountryInfo.cs
Normal file
33
MediaBrowser.Model/Globalization/CountryInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
namespace MediaBrowser.Model.Globalization
|
||||
{
|
||||
/// <summary>
|
||||
/// Class CountryInfo
|
||||
/// </summary>
|
||||
public class CountryInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display name.
|
||||
/// </summary>
|
||||
/// <value>The display name.</value>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the two letter ISO region.
|
||||
/// </summary>
|
||||
/// <value>The name of the two letter ISO region.</value>
|
||||
public string TwoLetterISORegionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the three letter ISO region.
|
||||
/// </summary>
|
||||
/// <value>The name of the three letter ISO region.</value>
|
||||
public string ThreeLetterISORegionName { get; set; }
|
||||
}
|
||||
}
|
||||
52
MediaBrowser.Model/Globalization/CultureDto.cs
Normal file
52
MediaBrowser.Model/Globalization/CultureDto.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using global::System;
|
||||
|
||||
namespace MediaBrowser.Model.Globalization
|
||||
{
|
||||
/// <summary>
|
||||
/// Class CultureDto
|
||||
/// </summary>
|
||||
public class CultureDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display name.
|
||||
/// </summary>
|
||||
/// <value>The display name.</value>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the two letter ISO language.
|
||||
/// </summary>
|
||||
/// <value>The name of the two letter ISO language.</value>
|
||||
public string TwoLetterISOLanguageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the three letter ISO language.
|
||||
/// </summary>
|
||||
/// <value>The name of the three letter ISO language.</value>
|
||||
public string ThreeLetterISOLanguageName
|
||||
{
|
||||
get
|
||||
{
|
||||
var vals = ThreeLetterISOLanguageNames;
|
||||
if (vals.Length > 0)
|
||||
{
|
||||
return vals[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string[] ThreeLetterISOLanguageNames { get; set; }
|
||||
|
||||
public CultureDto()
|
||||
{
|
||||
ThreeLetterISOLanguageNames = new string[] {};
|
||||
}
|
||||
}
|
||||
}
|
||||
63
MediaBrowser.Model/Globalization/ILocalizationManager.cs
Normal file
63
MediaBrowser.Model/Globalization/ILocalizationManager.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MediaBrowser.Model.Globalization
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface ILocalizationManager
|
||||
/// </summary>
|
||||
public interface ILocalizationManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the cultures.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{CultureDto}.</returns>
|
||||
CultureDto[] GetCultures();
|
||||
/// <summary>
|
||||
/// Gets the countries.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{CountryInfo}.</returns>
|
||||
CountryInfo[] GetCountries();
|
||||
/// <summary>
|
||||
/// Gets the parental ratings.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{ParentalRating}.</returns>
|
||||
ParentalRating[] GetParentalRatings();
|
||||
/// <summary>
|
||||
/// Gets the rating level.
|
||||
/// </summary>
|
||||
/// <param name="rating">The rating.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
int? GetRatingLevel(string rating);
|
||||
|
||||
/// <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>
|
||||
/// Gets the localization options.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{LocalizatonOption}.</returns>
|
||||
LocalizatonOption[] GetLocalizationOptions();
|
||||
|
||||
string RemoveDiacritics(string text);
|
||||
|
||||
string NormalizeFormKD(string text);
|
||||
|
||||
bool HasUnicodeCategory(string value, UnicodeCategory category);
|
||||
|
||||
CultureDto FindLanguageInfo(string language);
|
||||
}
|
||||
}
|
||||
8
MediaBrowser.Model/Globalization/LocalizatonOption.cs
Normal file
8
MediaBrowser.Model/Globalization/LocalizatonOption.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Model.Globalization
|
||||
{
|
||||
public class LocalizatonOption
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user