i18n-node | Lightweight simple translation module for node.js / | Runtime Evironment library
kandi X-RAY | i18n-node Summary
kandi X-RAY | i18n-node Summary
Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of i18n-node
i18n-node Key Features
i18n-node Examples and Code Snippets
Community Discussions
Trending Discussions on i18n-node
QUESTION
I want to use this package https://github.com/mashpie/i18n-node/blob/master/README.md in nestjs project.
How to get respond object in service for init module ?
...ANSWER
Answered 2021-Apr-02 at 19:39pass it from the controller
QUESTION
I just started creating a chatbot and I want it to be multilingual. So, I am using i18n module for the same. I added it's dependency in the package.json but now it is showing an error:
...ANSWER
Answered 2020-Jan-20 at 05:51You appear to be using multiple objects in a list inside your package.json file, I'm not sure if this is how package.json files are meant to work.
QUESTION
Here is my problem,
I am using i18n to manage the translations of all the content of a website made on Node.js, Express and EJS. i18n uses json files server-side. I've updated all pages I needed to, except for one.
My client is used to have a js file called from the footer on every pages. This file is pretty dense, and is ran only client-side.
Because of time constraints, we would prefer not to refactor this code.
How could I use my json translation files server-side from a script that is to be run only client side ?
I though about making a dedicated api service to call from client side and get all the translations but it seems pretty heavy.
Or I though about using Node.js to write manually, at the end of my js file ran client side, the translations JSON files when they'd get updated. But that would mean thousands of lines, it's true I have to forget writing perfect clean code for this case, but, well...
Before going further I'd really appreciate your help on this. I would have love just to refactor, but for some tricky reasons, it may not be the greatest for now.
Thanks and have a great day you all. :)
...ANSWER
Answered 2020-Jan-12 at 00:59What I did finally:
I've created a directory in /assets to store all translation json files.
If on test or dev environment, at every request I check if those files have been updated before or after /locales json files.
/server.js
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install i18n-node
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page