Hello.
I’m building an App and I use i18n extract shell. All is working fine but I need to do something and do not know what would be the best approach.
Imagine having 3 named columns.
The usual approach is to hardcode name them with __('column 1 name')
, etc.
Then, you have default.po in each language translating that string.
Also, the most common thing to do is to version translation files with GIT.
But what If I want all string to be versioned but not the column ones so in one instalation it can be “column 1 name” and in other instalation it is “name of column 1”
The following solution comes to mind:
To use (only for some strings) a different text domain: __('customStrings', 'column 1 name')
then have a customTexts.default.po
versioned and a local only customTexts.po
The downside of this approach is that if I forget to create the local ones, it will return the unmodified text.
It would be cool if I could just put the default translation in default.po and then override them with another *.po (without using domains) as same as you override config with local config files.
Another option is to use a customStrings table with TranslationBehavior but since it will be like <20 strings and they will never change, I don’t think it is the best thing to do.
So… what are your thoughts on this? Thanks.