Questions tagged [i18n-node]
24 questions
1
vote
0 answers
How to create multiple language files in i18n-node?
I work with Node+Express+i18n-node.
My project's a translation file will have about 5000 (rows) translations. I would like to split info in separate files:
locales
--en
----forms.json
----userinterface.json (about 1500 rows)
…

Audr
- 69
- 2
- 3
- 9
1
vote
2 answers
i18n Translation of Dynamically Added Text
Just got started with i18n for translating my website in Node. I'm at a bit of a loss of how to translate text that is generated after the DOM has loaded and jade file rendered (like after a user clicks a button).
I understand that i18n is a server…

Michał
- 868
- 1
- 10
- 36
1
vote
0 answers
i18n jade templates from ajax calls in sails
I'm having an issue with i18n my sails+jade app. When templates are loaded after an ajax call, the __ and __n functions are not visible, but I don't understand why?
I have wrapped the jade.renderFile call and am sending the request object as well,…

glasspill
- 1,290
- 4
- 21
- 36
1
vote
1 answer
How to localize a node.js app with different word positioning per locale mixing static & dynamic localized text?
I have a node.js express 4 web-app I need to translate and display in several languages. I'm learning to use i18n-node package in handlebars.
Some of the localized text data comes from the db (dynamic data) and some comes from a static text json…

Ajar
- 1,051
- 3
- 13
- 29
0
votes
0 answers
NodeJS i18n localization can't set locale as 'ar' but as 'arabic'
I am using mashpie i18n localization package in my nodeJS application. Here is the github link of the same package.
Here is my app.js code:-
i18n.configure({
locales : ['en','ar'],
defaultLocale : 'en',
autoReload : true,
…

Saswat
- 12,320
- 16
- 77
- 156
0
votes
1 answer
node.js i18n: Use __ or import?
I am new to i18n and have an existing repository that uses it. I noticed different syntax for using i18n throughout the repository and am wondering what is the best way.
I am confused about the structure below and which syntax option is best (I…

Marty
- 2,132
- 4
- 21
- 47
0
votes
0 answers
Express, i18n and custom not found page
I am building an Express app for personal use but I want it to support multiple languages. I'm using the i18-node for english (en) and spanish (es) and had written two routes, as follow:
function setLanguage (req, res, next) {
const locales =…

David Daza
- 11
- 2
0
votes
2 answers
Node express api routes for multilingual directory like url
Does any one knows an example or could explain here how node.js and express would have to route for a multilanguage site? I'm using i18n-node for translation and folder like routing ( /es/, /de/ , etc ) for different languages. This all are static…

MikZuit
- 684
- 5
- 17
0
votes
0 answers
I18n html markup rendering w/ express-flash
I'm wondering about implementation in a node/express controller of i18n segments when they contain html markup. I'm using express-flash to output an error message after a post request:
i18n.__({phrase: 'flash.my_custom_error_message', locale:…

goodthngs
- 33
- 12