Skip to content

Commit 33f3485

Browse files
committed
Add ADR for using Mobility's table backend
1 parent 9eb96e4 commit 33f3485

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# ADR046: Use Mobility's table backend strategy to store translations
2+
3+
Date: 2025-09-08
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We previously decided in [ADR043: Use Mobility gem with :column strategy to manage translated fields](ADR043-use-mobility-with-column-strategy.md) that we would use Mobility's column strategy to handle storing translations.
12+
13+
Our initial proposal was to use the column strategy (the simplest strategy Mobility supports) while we had a small number of languages (English and Welsh), and reassess later whether to use a more elaborate strategy if we add more languages. We concluded that Mobility's table strategy (described as 'Model translation tables' in the earlier ADR) scales better with an increased number of languages, so this is likely to be a better option than the column strategy if we need to support more than a few languages.
14+
15+
In conversations with departments we have found that there is demand for supporting additional languages, so we think we are likely to need the more scalable backend strategy.
16+
17+
Rather than implement the column strategy initially and migrate to the table strategy later, it would be less work to implement the table strategy directly.
18+
19+
## Decision
20+
21+
We have decided to:
22+
23+
- implement translation tables for each model
24+
- use the Mobility gem, configured with the `:table` backend strategy, to manage this
25+
26+
## Consequences
27+
28+
- adding additional languages in future should be easier
29+
- when adding new models, we will need to add a translation table for each new model

0 commit comments

Comments
 (0)