I'm trying to use i18n-for-browser with i18n, but I don't know how to include the module i18n-for-browser installed server-side via NPM, on the client-side in a <script>
tag. My Node server is also running express.
Here is what I know:
- i18n translates and works fine on the server-side
- i18n and i18n-for-browser are installed server-side, and my dilemma lies on the client-side or front end
- browser-i18n (different than i18n-for-browser) works fine by placing the javascript file in my public/Javascript folder and linking it as usual with a tag, the only issue with browser-i18n being that it doesn't have the features I require like i18n does - see my other question and answer.
Here is what I don't know:
- is i18n and i18n-for-browser interchangeable?
- Why are a lot of NPM modules using import if Node doesn't support import yet? (Answered by Keith in comments)
- How can I use i18n-for-browser (or i18n, if interchangeable) on the client side?
Any ideas?