//
//  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 cancellation token for cancelling the operation.
    /// The translated string or an error.
    public Task> GetTranslationAsync(TranslationRoot root, string key, Language? language = default, CancellationToken ct = default);
    /// 
    /// Gets the translation of the given key.
    /// 
    /// The translatable string containing .
    /// The language,  will be used if null.
    /// The cancellation token for cancelling the operation.
    /// The translated string or an error.
    public Task> GetTranslationAsync(TranslatableString translatableString, Language? language = default, CancellationToken ct = default);
}