Comments (3)
Put equivalent translations under the same root language tag. You would make an entry for "en", and en-us/gb will automatically get translations from "en"
from l10n.js.
Can you give an example? Are you saying you can't make en-US.json
and en-GB.json
files and have to make a en.json
file with all the locales in it?
However, I'm still unsure if this means you can leave out data that doesn't need translating as it's either the default language or is the same in en-GB
as it is in the default language.
from l10n.js.
As stated by eligrey, you could solve this requirement by structuring your localized messages as follows:
{
"en":{
"my message": "my message"
},
"en-US": {
"color": "color"
},
"en-GB": {
"color": "colour"
}
}
when a property is not found for an specific locale variant ("en-US" for example), it will search its base locale ("en" in this case).
from l10n.js.
Related Issues (17)
- IE chokes on indexOf HOT 2
- Russian l10n for demo HOT 4
- Canadian English localisation [sic]
- Cannot call method 'valueOf' error HOT 3
- IOS Translation HOT 2
- Loading language files fails on some browsers due to inconsistent status codes
- Synchronous XMLHttpRequest HOT 2
- japanese demo is broken HOT 2
- Bower
- Use different locale than the selected one HOT 5
- ReferenceErrors in browserless environment HOT 2
- Does localization file have to be a .js file rather than .json file if included after library? HOT 3
- Cannot get this to work... HOT 4
- Problem and a possible fix for Chrome 39 HOT 2
- Can you do translations with numbers? HOT 2
- Support format {"property":{"lang1":"localized message in lang1"}}
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 l10n.js.