I’m working on translating my application, and am wondering what the best practice might be for initializing the database. There are a few tables, for example user groups, which have pre-defined values added by a seed during the setup. I’d like to get translations for them into the i18n table at the same time, in a way that will be long-term maintainable.
My current thought is to have my seed set the locale and then use
__d() to get the current provided translation, iterating through all the locales that I currently support. This way, I can make sure that the strings are all included in my
.po files for translators to work with, while still providing the user with the ability to customize them for their installation.
Are there potential downsides to this that I’m missing? Or better ways of going about it that I haven’t considered?