mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-27 15:39:47 +00:00
Added content API to language plugins to access all the data
This commit is contained in:
parent
2af61beea6
commit
85c93cea43
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user