mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 07:59: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.
|
/// Gets the name of the language.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string LangName { get; }
|
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 string LangName => string.Empty;
|
||||||
|
|
||||||
|
public IReadOnlyDictionary<string, string> Content => new Dictionary<string, string>();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
@ -166,5 +166,8 @@ public sealed class PluginLanguage : PluginBase, ILanguagePlugin
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string LangName => this.langName;
|
public string LangName => this.langName;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IReadOnlyDictionary<string, string> Content => this.content.AsReadOnly();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user