My Scenario:
MainWindow with SplitView and several Pages, each containing Labels, Buttons and Tabs. I'm using the MVVM pattern, now I want to be able to change the language at run time using e.g. a ComboBox. The language keys should be read from an external file e.g. an .mdb-file, that is because it should be possible to change the description of some buttons after compilation.
I was already reading a lot, most of the time they used resource-files or didn't follow the MVVM pattern. The closest I found was this.
Here I'm facing four problems:
- They use the code-behind of the MainWindow to set the DataContext, mine is already used for the Menu :/
- The text in my Labels/Buttons should be changed on several Pages, how do I do this?
- I generate some content of the menus in my ViewModel, how to use here the language keys from the file? I can not bind them like in the XAML?
- There is no option to choose which language setting should be applied. (this I might be able to figure out as soon as I know that the concept is worth to pursue at all)
I'm new to MVVM and C#, so I'm not yet very familiar with the thinking in MVVM pattern, but I hope that you can help me to find a solution:)
Edit: The linked question did not solve my problem because it does not fulfill my need for language files that are stored externally and can be modified and read in during run time. Altough it's a very good approach which I'll use when I don't need to modify the language files externally:)