jellyfin/MediaBrowser.Model/Globalization/CultureDto.cs

59 lines
1.6 KiB
C#
Raw Normal View History

2020-02-03 17:49:27 -07:00
#pragma warning disable CS1591
2022-01-22 07:40:05 -07:00
using System.Collections.Generic;
2018-12-27 16:27:57 -07:00
namespace MediaBrowser.Model.Globalization
{
/// <summary>
2020-02-03 17:49:27 -07:00
/// Class CultureDto.
2018-12-27 16:27:57 -07:00
/// </summary>
public class CultureDto
{
2022-01-22 07:40:05 -07:00
public CultureDto(string name, string displayName, string twoLetterISOLanguageName, IReadOnlyList<string> threeLetterISOLanguageNames)
{
2022-01-22 07:40:05 -07:00
Name = name;
DisplayName = displayName;
TwoLetterISOLanguageName = twoLetterISOLanguageName;
ThreeLetterISOLanguageNames = threeLetterISOLanguageNames;
}
2018-12-27 16:27:57 -07:00
/// <summary>
2022-01-22 07:40:05 -07:00
/// Gets the name.
2018-12-27 16:27:57 -07:00
/// </summary>
/// <value>The name.</value>
2022-01-22 07:40:05 -07:00
public string Name { get; }
2018-12-27 16:27:57 -07:00
/// <summary>
2022-01-22 07:40:05 -07:00
/// Gets the display name.
2018-12-27 16:27:57 -07:00
/// </summary>
/// <value>The display name.</value>
2022-01-22 07:40:05 -07:00
public string DisplayName { get; }
2018-12-27 16:27:57 -07:00
/// <summary>
2022-01-22 07:40:05 -07:00
/// Gets the name of the two letter ISO language.
2018-12-27 16:27:57 -07:00
/// </summary>
/// <value>The name of the two letter ISO language.</value>
2022-01-22 07:40:05 -07:00
public string TwoLetterISOLanguageName { get; }
2018-12-27 16:27:57 -07:00
/// <summary>
/// Gets the name of the three letter ISO language.
2018-12-27 16:27:57 -07:00
/// </summary>
/// <value>The name of the three letter ISO language.</value>
2022-01-22 07:40:05 -07:00
public string? ThreeLetterISOLanguageName
2018-12-27 16:27:57 -07:00
{
get
{
var vals = ThreeLetterISOLanguageNames;
2022-01-22 07:40:05 -07:00
if (vals.Count > 0)
2018-12-27 16:27:57 -07:00
{
return vals[0];
}
2019-08-16 08:31:47 -07:00
2018-12-27 16:27:57 -07:00
return null;
}
}
2022-01-22 07:40:05 -07:00
public IReadOnlyList<string> ThreeLetterISOLanguageNames { get; }
2018-12-27 16:27:57 -07:00
}
}