Internationalization in DDD (Domain Driven Design) architecture

Asked

Viewed 555 times

2

What would be the best strategy to internationalize a system in the DDD architecture, knowing that we have strings to internationalize present in the layers:

  1. Presentation - Views
  2. Application - Viewmodels nos Dataannotation
  3. Domain - Validation and Specifications

Taking into account that the Domain layer should not know any layer, it would be discarded the possibility of creating an internationalization project in a layer that permeates all others?

  • "would be ruled out the possibility of creating an internationalization project in one layer that permeates all others?" In my opinion, it would not be ruled out, this internationalization project is clearly a cross Cutting Concern.

  • Ola Marcell! But what you tell me by the Domain layer is agnostic, that is, it does not depend on any other, even so you find it interesting to create a Crosscutting project, because then my domain would know this project.

  • I hint at this framework, and how it handled localization: https://aspnetboilerplate.com/Pages/Documents/Localization Using IOC you can create a crosscutting layer with no direct relationship to Domain.

2 answers

1

  • Thanks Tiorac, I managed to resolve, but had forgotten to comment here.

0

Good morning friends, after investing some time in research I solved my problem of internationalization by creating a layer Crosscutting, where through the layers I realize the internationalization of all my project, that is, I can realize the internationalization of my Views (Layer Presentation), Viewmodel(Application Layer), validations messages, specifics, etc. (Domain Layer).

Taking advantage, I created a tool that automates the entire process of creating the layers (with the exception of my Views), based on queries in the database, that is, to perform a simple Crud in DDD, I have about 18 files where they are generated in just one click. I will make it available in the future to help the developer community

Browser other questions tagged

You are not signed in. Login or sign up in order to post.