-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for structured json #58
Comments
keeping on roadmap |
Just FYI, I implemented something similar for experimental purposes: https://github.com/oliversalzburg/i18n-node/tree/complex-backend It uses dot notation ( There's only an implementation for single terms (no plural support). As I said, it was an experiment ;) |
+1 |
+1! |
+1 @oliversalzburg your modification works like a charm and as I can see the mustache support is at the package.json, too. please keep this fork updated as long as possible. may be it should be discussed to use you configuration modification for later versions (the naming is very obvious). at least it could be very helpful to add the changes to the documentation of your fork to make the usage easier for people who don't know this thread ;-). |
@ronny332 Cool to see that someone has use for it :) We use i18n-node very extensively ourselves and I'd be happy to maintain the fork if anyone is actually using it ;) |
please also keep reading notification - this will definitely get merged. I am again stuck in some paid jobs with critical deadlines but will catch up in july... promised :) |
Cool. I'll try to complete the feature then and give it a little more thought. Cheers! :) |
I've made a couple of changes in my fork. I made sure that pluralization works and made it possible to declare a default string to use for each object literal. I also added some documentation: https://github.com/oliversalzburg/i18n-node/tree/complex-backend#object-notation |
@oliversalzburg could you make a pull request and merge your fork? |
@juancroca I created a PR at #114 But it's not up to me to merge :) I'd appreciate it if you could test the branch regardless of it being merged. Cheers |
@oliversalzburg I did and it works wonderfully thanks hope they merge it. |
so this is merged, please kindly retest - thanks again to @oliversalzburg |
Support for structured json would be nice:
Equivalent to:
So you can translate:
i18n.__('home-title')
.An alternative could be to have the possibilities to import JavaScript files and not only JSON Format.
The text was updated successfully, but these errors were encountered: