Extract truncation logic to helper and add tests

This commit is contained in:
854562
2026-07-20 22:00:10 +02:00
committed by GitHub
parent c632417dda
commit 2cd2f36fe4
5 changed files with 63 additions and 11 deletions
@@ -72,6 +72,14 @@ public interface ILocalizationManager
/// <returns>The correct <see cref="CultureDto" /> for the given language.</returns>
CultureDto? FindLanguageInfo(string language);
/// <summary>
/// Gets a human-readable display name for the given language code.
/// Truncates at the first semicolon or comma to avoid cluttered ISO-639-2 names.
/// </summary>
/// <param name="language">An ISO language code.</param>
/// <returns>The display name, or null if not found.</returns>
string? GetLanguageDisplayName(string language);
/// <summary>
/// Returns the language in ISO 639-2/T when the input is ISO 639-2/B.
/// </summary>