Files
Elternbeirat/Elternbeirat.Web/Shared/Cultures.cs
T

22 lines
772 B
C#

using System.Globalization;
namespace Elternbeirat.Web.Shared;
/// <summary>
/// Shared <see cref="CultureInfo"/> instances used to format visitor-facing
/// text.
/// </summary>
/// <remarks>
/// Kept in one place so every component renders month and weekday names the
/// same way, rather than each holding its own <c>de-DE</c> lookup. This is only
/// for display text; machine-readable output (e.g. an HTML <c>datetime</c>
/// attribute) uses <see cref="CultureInfo.InvariantCulture"/> instead.
/// </remarks>
internal static class Cultures
{
/// <summary>
/// German culture, for the month and weekday names visitors read.
/// </summary>
public static readonly CultureInfo German = CultureInfo.GetCultureInfo("de-DE");
}