Localization in Clean Architectire
I'm working on a project which requires localization on a presentation layer and I don't know which layer I should put my localization service in.
By default I wanted to put it in the presentation, since it seems to be the easiest approach and that's what ChatGPT told me to do. But the problem with this is that if I will have multiple presentation layers I will have to create a service for each layer. Another problem with this is that I can't use localization in Application layer which returns some messages (exception messages, validation errors) and I have to use enums for each error in my request:
It looks pretty messy and I think it would be better to store and localizizations as well as Lozalization service in Infrastructure layer.
What is your opinion about this?
By default I wanted to put it in the presentation, since it seems to be the easiest approach and that's what ChatGPT told me to do. But the problem with this is that if I will have multiple presentation layers I will have to create a service for each layer. Another problem with this is that I can't use localization in Application layer which returns some messages (exception messages, validation errors) and I have to use enums for each error in my request:
It looks pretty messy and I think it would be better to store and localizizations as well as Lozalization service in Infrastructure layer.
What is your opinion about this?