Closed cielito-lindo-productions closed 7 years ago
hm...saveMissing should be all needed to let i18nextify send missing keys via xhr-backend to your backend route. -> you should see the missing calls in your developer console of your browser
does your backend provide a route for those POST requests to addPath?!? https://github.com/i18next/i18next-xhr-backend#backend-options
This really should work - we use that commercial in our i18next service tier -> https://locize.com
The sample has that route https://github.com/i18next/i18nextify/blob/master/example/server.js#L33
using a saveMissingHandler from the express-middleware we created for i18next
with functionality: https://github.com/i18next/i18next-express-middleware/blob/master/src/index.js#L100
Thanks for your comments. Can I use the saveMissingHandler within i18nextify? I don't use the express-middleware.
I tried to add the addPath-command but without success. I even created the files at the indicated places but without success:
`
` At least in the console i18nextify now states all the missing resources: `i18next: missing resources: { "en": { "translation": { [...`Formating somehow doesn't work. Please check https://jsfiddle.net/ue3b8ukt/ for correct formating
saveMissingHandler is serverside - no way that can run on the client - only thing you get on loading with fallback language is an output in console for the missings which you could copy over to your file manually - else try using locizify and https://locize.com supports the future of i18next i18n ecosystem and offers you a nice UI for translations (incontext editor and and and) ;)
what formatting? you fiddle is wrong: see https://jsfiddle.net/c9kaqbjv/
Thanks for the explanation, that was a misunderstanding on my side.
With formatting I meant my above post in which the code is without line breaks.
so we could close this...?
yes, you can go ahead and close it, thanks.
Hi,
first of all thanks for all your great work.
I'm actually trying i18nextify out and would like to save missing translations in the file structure on my webserver (apache). For this I set debug and saveMissing to true.
This is the code I use
`
` The console in the debugger shows the following: `i18next::backendConnector: loaded namespace translation for language de Object { Flexible connection to: "Flexible Verbindung zu " } i18nextify.min.js:1:18859 i18next::backendConnector: loaded namespace translation for language en Object { Flexible connection to: "Flexible connection to " } i18nextify.min.js:1:18859 i18next: languageChanged de i18nextify.min.js:1:18859 i18next: initialized Object { debug: true, initImmediate: true, ns: Array[1], defaultNS: "translation", fallbackLng: Array[1], fallbackNS: false, whitelist: false, nonExplicitWhitelist: false, load: "all", preload: false, 34 more… }` I have the folder locals on my webspace and within a folder de and a folder en. Each of them has a file translation.json and translation.missing.json The translations from translation.json are read correctly by i18nextify but the other file is not filled up with the missing translations. Some days ago I tried starting my homepage from within node.js (as in the example) and there the translation.missing.json was filled up properly. Am I missing something? Greetings Cielito Lindo Productions