4 ms·
This is great. As someone who spent a great deal of time working on i18n with JS for my own software the current state of the art is not amazing. A lot of half
by lucisferre 6y ago
This is great. As someone who spent a great deal of time working on i18n with JS for my own software the current state of the art is not amazing. A lot of half finished and abandoned projects, many of which don't entirely work or conform to pre-existing standards. Most don't play well with newer web frameworks and those that do tend to be very limited.
Finding a good solution for VueJS, which has it's own .vue files was particularly hard. I ended up building on top an existing i18n extract tool and integrating it with the VueJS compiler to extract both HTML and JS translations.
What I'd like to see, that I have not seen anywhere (other than a broken and not currently maintained Webpack module) is a plugin for Babel or Typescript compilers that allows the compiler to compile translations into the final output packages and produce one for each language. I think this is preferable to loading translations at runtime and swapping them in.
- FallenMax 6y agoWill definitely look into .vue support! But for compile translations (per-language), I'm not so sure if added performance can justify introduced complexity (for users' build/serve workflow).