Open
Description
Summary
When a frontend application makes a request to the api, we get back error messates/responses in English.
As we seek to translate our sites, we need an approach for i18n and whether the API should contain translations or whether they should live in client applications.
Context
Options
Some options:
- Translations stay in the client applications
- We pass back a key which the client application will use to select the right validation error message
- e.g.
cannot_be_blank
- This keeps translations in one place, and means each application can have its own message e.g. if one application is tailored for children and another isn't.
- the API returns error messages translated based on the locale passed in
- We pass the locale in with out POST requests, and the API returns invalid field messages translated
- This means we get back translated error messages fairly easily, but the messages will be the same across all clients