Should Localization Ever Be Part of Domain or Business Logic?

August 7, 2026 3 answers
Asked by MellowPine42
I was taught that localization should stay limited to the presentation layer, but I'm wondering how this works in real applications. Do developers ever use locale or language data inside core business logic, or should the domain remain completely independent of how information is displayed?

Answers

NorthCedar8
There can be an exception when the domain itself is fundamentally tied to a particular language. Some industries use specialized terms that do not translate cleanly, so modeling those concepts in the language used by the subject-matter experts can be practical. That is more about choosing the domainโ€™s terminology than ordinary UI localization.
Reply to this answer
VividNook31
A good separation is for the domain to return structured results, error codes, or validation keys, while the UI or document-generation layer turns those into localized text. That keeps translations from being scattered through service code and makes adding another language much easier.
Reply to this answer
CrispOrbit7
Localization should generally stay at the presentation boundary. If the core logic starts depending on values like โ€œen-USโ€ or translated strings, changing languages can unexpectedly affect business behavior and make testing much harder. For rules involving geography, taxes, or compliance, use an explicit country code, region, or domain-specific enum instead of the userโ€™s display locale.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions