Skip to main content
7 events
when toggle format what by license comment
Dec 7, 2024 at 11:32 comment added Ewan not really, the presentation layer is a good place for it and it fits the pattern. Sure you could do it in the view, but you would be breaking the pattern for no good reason
Dec 7, 2024 at 9:45 comment added Doc Brown Localization in UIs should be a mechanism orthogonal to an MVP layering. The presenter separates just "testable logic" from the view. The text translation can happen at the view layer as well as at the presenter layer, wherever it is needed. Ideally, as a UI dev, the only thing you have to keep in mind is that the texts you are using somwhere in both layers are implemented in parts which are all translatable on its own, and the translation mechnism should be an a separated, orthogonal concern.
Dec 7, 2024 at 9:40 comment added Ewan even in non i8n apps you might still use dynamic text
Dec 7, 2024 at 9:39 comment added Ewan potentially you might use a view per language for special cases, but it would be an odd approach to use globally
Dec 7, 2024 at 9:38 comment added Ewan I think that would break the pattern. Your views would have to call out
Dec 7, 2024 at 9:21 comment added Doc Brown Bad example. One could design an internationalized application and still place the localization at the View layer, so the view models (or presenters) don't even know about it. Or even create different Views (one for each language) all using the same presenter.
Dec 7, 2024 at 8:42 history answered Ewan CC BY-SA 4.0