I am refactoring an existing WinForms application into WPF and MVVM (little knowledge apart from theory in MVVM). The application needs to be fully localized. I am OK with this as far as the UI goes (store resources and bind to them based off enumerations and other structures).
The application must present a dynamically generated pdf to the user. Where should this localization information go:
In the backend with the pdf creation logic
Pro: easier logic flow
Con: against MVVM theory, as backend is not supposed to know anything about how it is being displayed. Also less maintainable (2 places with localization data)
Pass the objects to the view to translate. This will mean PDF generation code would need to come into the view.
Pro: Only one spot to maintain localization
Con: Also against MVVM theory, as view is not supposed to have logic in it
Neither solution really seems ideal to me. Any ideas?