So I use gettext in my php project to translate strings. However, in som cases, the context of a string is not obvious so I would like to add a comment to the string for the translator. However, it is not clear to me how to do this in a good way.
I would love to do it like this:
_("My text string","My comment that describe the string context for my translator")
When I code I use:
find ./app -iname "*.php" | xargs xgettext -d app/Locale/messages
To scan for new strings and then compile the messages.po file.
Is it possible to add comments to text strings like this? Or what is the best practice for adding comments for translators?
Best! Samuel
I haven't seen any similar solutions yet when googling...