Closed mattvl closed 5 years ago
where you will be storing localized resources?
Hi @valdisiljuconoks, Usually I use the DbLocalizationProvider for translations, so they will be stored in the database.
In a standard solution I can include them in the viewmodel when a separation between frontend and back end is needed. What would you suggest in this case?
Thanks
@mattvl The returned model is modified in the ExtendedContentModelMapper.cs, where we add info about existing languages. You can probably add more properties there if you want. You can also follow this guide for more modifications to the Content Delivery API results: https://world.episerver.com/documentation/developer-guides/content-delivery-api/how-to-customize-data-returned-to-clients/
Thanks a lot @seriema for the clarification. That's exactly what I was searching for!
I see the model is handled in epiDataModel.js which relies on the Epi API. Would it be possible to add extra data to it? (maybe from the controller for example). I'm thinking about translations from the dictionary or custom properties not from Episerver. It would be nice to be able to use the model as a view model.
Regards, Matteo