namespace MyAi.Data.Services; /// /// Provides access to localised string templates stored in the myAi.Templates table. /// Implementations are expected to cache templates and refresh periodically. /// public interface ITemplateService { /// /// Returns the template value for the given key and language. /// Falls back to "en" when the requested language has no entry. /// Returns the raw key string when no matching template is found. /// /// Template key (e.g. "html.job-search-start.title"). /// Two-letter language code (e.g. "en", "ro"). /// Template value string. string Get(string key, string language = "en"); /// /// Retrieves the template and substitutes {{placeholder}} tokens with the provided values. /// /// Template key. /// Two-letter language code. /// Named replacement pairs in the form ("name", value). /// Rendered template string with all placeholders replaced. string Render(string key, string language, params (string Key, string Value)[] placeholders); }