Extract truncation logic to helper and add tests
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user