Comments (13)
keeping on roadmap
from i18n-node.
Just FYI, I implemented something similar for experimental purposes: https://github.com/oliversalzburg/i18n-node/tree/complex-backend
It uses dot notation (home.title
) for structured lookups. To avoid issues with existing translation terms (which might include .
in a phrase), this has to be enabled with objectNotation:true
in the i18n.configure
call.
There's only an implementation for single terms (no plural support). As I said, it was an experiment ;)
from i18n-node.
+1
from i18n-node.
+1!
from i18n-node.
+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 ;-).
for me the usage of structured language files is very important to keep the clarity. the support at webtranslateit is very useful.
from i18n-node.
@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 ;)
from i18n-node.
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 :)
from i18n-node.
Cool. I'll try to complete the feature then and give it a little more thought. Cheers! :)
from i18n-node.
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
from i18n-node.
@oliversalzburg could you make a pull request and merge your fork?
from i18n-node.
@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
from i18n-node.
@oliversalzburg I did and it works wonderfully thanks hope they merge it.
from i18n-node.
so this is merged, please kindly retest - thanks again to @oliversalzburg
from i18n-node.
Related Issues (20)
- how to pass a default translation if a phrase isnt existed in the en.json file HOT 3
- Locales are case sensitive HOT 3
- __h has strange behavior when he doesn't have the key HOT 1
- [Discussion] Contrast reports path traversal vulnerability HOT 4
- [Discussion] Allow a parser option to customize storage format HOT 2
- Maximum call stack size exceeded with some settings HOT 4
- Get string from locale file without substitution HOT 4
- passing a zero number value (0) incorrectly returns the full json string, brackets and all, without injecting the replacement value HOT 3
- When i18n is packaged into exe cannot be used, i18n directory cannot find the files under the directory path. HOT 3
- yml parser TypeScript and locale issues
- [Bug] translation API is returning `undefined` when provided locale is `undefined` or `null`
- There are no 0.15.1 release and tag.
- There are no 0.15.1 release and tag. HOT 1
- i18n ignores en.json language file HOT 1
- Error: Cannot find module Cyclic.sh sever HOT 1
- Problems with local files HOT 3
- ES Modules HOT 9
- feature request: support plurals with specific numbers HOT 5
- Readonly environment HOT 2
- `__n` not working as per documentation in the description
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18n-node.