I am developing a multi-language WPF application where I implemented different langauges via ResourceDictionary. All string from the program hold a reference to a ResourceDictionary key.
This is working perfectly fine, but only for main window. How can I apply it to any other windows aswell?
The code that changes the language looks like this:
ResourceDictionary dict = new ResourceDictionary();
dict.Source = new Uri("..\\Resource Dictionary\\Jeziki\\SloLanguage.xaml", UriKind.Relative);
this.Resources.MergedDictionaries.Add(dict);
Example main window controls
<MenuItem Header="{DynamicResource datoteka}" Template="{DynamicResource MenuItem}" Foreground="White">
<MenuItem Header="{DynamicResource novo}" Click="menu_novo_Click" Foreground="Black"/>
<MenuItem Header="{DynamicResource odpri}" Click="menu_open_Click" Foreground="Black"/>
<MenuItem Header="{DynamicResource shrani}" Click="menu_save_Click" Foreground="Black"/>