I'm rewritting my internationalization module to support the FTL file format instead of simple JSONs.
I was able to have these assets like this with my previous module:
res/lang/en-US/_.json
res/lang/en-US/other.json
Then I could get messages by _.hello-world
, other.blah-blah
...
Is Fluent bound to only one file and is it only my mind that thought it'd be useful to load multiple files for a single language?
Yes, I could concatenate the files, but this will turn debugging hard in case the files have a syntax error. The only idea I've right now is concatenate and put comments to identify to which FTL file belongs the error, like this:
# res/lang/en/foo.ftl
...
# res/lang/en/bar.ftl
...