search and ai stabilization work, localization stablized.
This commit is contained in:
17
src/__Libraries/StellaOps.Localization/LocaleContext.cs
Normal file
17
src/__Libraries/StellaOps.Localization/LocaleContext.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace StellaOps.Localization;
|
||||
|
||||
/// <summary>
|
||||
/// Ambient locale for the current async call chain.
|
||||
/// Set by the localization middleware, read by <see cref="T._t"/>.
|
||||
/// </summary>
|
||||
public static class LocaleContext
|
||||
{
|
||||
private static readonly AsyncLocal<string?> _current = new();
|
||||
|
||||
/// <summary>Current request locale (e.g., "de-DE"). Null falls back to default.</summary>
|
||||
public static string? Current
|
||||
{
|
||||
get => _current.Value;
|
||||
set => _current.Value = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user