I “think” I have a plan to ensure that translated messages are displayed to the user. I will ensure that AddressHierarchyAjaxController#getPossibleAddressHierarchyEntriesWithParents(..)
returns translations to the UI.
However right now I’m stuck at step 0…
Then the other step is to ensure that when a patient is created/updated, all the address fields get translated back into i18n messages someplace prior to saving the patient. I was thinking of introducing a MethodBeforeAdvice
on PatientService#savePatient(Patient)
.
Will I have the locale at hand then? If not is there anywhere else where to intercept the patient before it gets saved?