Would be nice to see how this would work with DbMessageSource instead of the PhpMessageSource.
I have tried working with translations and DbMessageSource, but for some reason Gii keeps crashing on not existing category’s when I check the i18n checkboxes when I generate models and crud. Can’t figure out how to solve this (yet).
In my case, once I define ‘frontend’ category in the i18n component with DbMessageSource class, I can then use Gii to generate message categories like frontend, frontend/home, frontend/pages,… etc.
Test and let me know if it works for you. Just remember all base categories for messages must be configured when configuring the component.