I have a project that I want to be localizable. While most strings are in the source code, where xgettext/Poedit can easily find them when wrapped with the localization function call, some are in pure JSON files, that I'm using for data storage. Since it's just JSON, and not actually JS, I can't use function calls. For example, a little database:
somedb.txt
[
{ "id": 1, "name": "Xyz", "local": "AxWhyZzz", /*...*/ },
/*...*/
]
Is there a way to extract the "local" values from the JSON files with xgettext? And if there isn't, what are my options? Creating a source file that has all local values, wrapped with calls to _
?
Alternatively I could write my own parser of course, or modify gettext, but I'd much rather use existing solutions if available.