// // ILanguageService.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Remora.Results; namespace NosSmooth.Data.Abstractions.Language; /// /// Service for translating NosTale strings. /// public interface ILanguageService { /// /// Gets or sets the current language. /// public Language CurrentLanguage { get; set; } /// /// Gets the translation of the given key. /// /// The root type of the key. /// The key to translate. /// The language, will be used if null. /// The translated string or an error. public Result GetTranslation(TranslationRoot root, string key, Language? language = default); /// /// Gets the translation of the given key. /// /// The translatable string containing . /// The language, will be used if null. /// The translated string or an error. public Result GetTranslation(TranslatableString translatableString, Language? language = default); }