Hi,
thanks for the great idea, it works so well, but I don't understand how to change language during runtime. My hope was to do it on the selection changed event of a combox like:
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
var content = ((ComboBoxItem)e.AddedItems[0]).Content.ToString();
switch (content)
{
case "en":
Translation.SetResourceManager(this, Properties.ResourcesEn.ResourceManager);
break;
case "de":
Translation.SetResourceManager(this, Properties.ResourcesDe.ResourceManager);
break;
}
}
but the language is not updated. I did also try to change the CurrentCulture
like:
TranslationSource.Instance.CurrentCulture = new CultureInfo("en-US");
and hoped it would reevaluate all bindings, but this also does not update the bindings.
Perhaps you could point me into the right direction. Thank you!