I may have found the solution. Worlds can apparently use a resourcepack bundled with them automatically (kind of like server that suggests you to use its resourcepack), so I guess the translation keys could be bundled in the world resourcepack, while the datapack defines custom advancements that use these translation keys. I'll need to test it out first. If it works, I found the solution.
Okay, so I found what does actually work, and that is "resources.zip" file inside the world directory, that ZIP file contains the resourcepack used by the world (it's a forced resourcepack, btw). That's perfect. I tried "resources" directory, also tried "resources.zip" directory (not file), none of those workarounds worked, sadly. So I do need to use ZIP files in order for the resourcepack to work.