using System;
namespace HC_APTBS.Services
{
///
/// Provides runtime language switching and localised string retrieval.
///
///
/// XAML bindings use {DynamicResource Key} which update automatically
/// when the merged is swapped.
/// C# code uses for the same keys.
///
public interface ILocalizationService
{
/// Current language code — "ESP" or "ENG".
string CurrentLanguage { get; }
///
/// Switches the active UI language by swapping the merged resource dictionary
/// and persisting the choice to config.xml.
/// Must be called from the UI thread.
///
/// "ESP" for Spanish or "ENG" for English.
void SetLanguage(string languageCode);
///
/// Retrieves a localised string by resource key.
/// Returns the key itself when no matching resource is found (fail-visible).
///
/// Resource key defined in Resources/Strings.*.xaml.
string GetString(string key);
///
/// Raised after the active language dictionary has been swapped.
/// ViewModels subscribe to refresh any cached localised strings.
///
event Action? LanguageChanged;
}
}