Imagine a backend service modeled by a hexagonal architecture, where the domain has a class modeling, let us say, a Step of a creative flow that a mobile app will use:
class Step(
val stepId: String,
val description: String
)
The description should come to the client translated according to the User preferences. Nope, the client won't explain it. It expects it told already.
Here is the question: how would you model the translation? There are several ways of course, but I want your opinion on it.
For instance: I could set the description
with a default language, and then I could perform a translation on the infrastructure level when returning the Step. But this way, I wouldn't make explicit it on a domain level.