Added content API to language plugins to access all the data

This commit is contained in:
tsommer committed 2025-04-25 15:24:57 +02:00
1 parent 2af61beea6
commit 85c93cea43
3 files changed
+10

No files matched your search

@@ -29,4 +29,9 @@ public interface ILanguagePlugin
/// Gets the name of the language.
/// </summary>
public string LangName { get; }
/// <summary>
/// Get all keys and texts from the language plugin.
/// </summary>
public IReadOnlyDictionary<string, string> Content { get; }
}
@@ -22,5 +22,7 @@ public sealed class NoPluginLanguage : PluginBase, ILanguagePlugin
public string LangName => string.Empty;
public IReadOnlyDictionary<string, string> Content => new Dictionary<string, string>();
#endregion
}
@@ -165,6 +165,9 @@ public sealed class PluginLanguage : PluginBase, ILanguagePlugin
/// <inheritdoc />
public string LangName => this.langName;
/// <inheritdoc />
public IReadOnlyDictionary<string, string> Content => this.content.AsReadOnly();
#endregion
}