Comments (3)
Yes my request is what you say in the second time, so my proposal here is to create a new property defaultLanguage
to be sure that even if the language property is not in the dictionary (spanish in this example) the defaultLanguage
(so english or french in this example it depends of the choice I will made) will be applied.
I am sorry if it was not very clear.
Hmm #22 is not really what I mean, but here in this issue @felixzapata says exactly what I mean.
The proposal is not to return the key in the language it is because this language was not find in the dictionary, but to return the key in the defaultLanguage
, and this defaultLanguage
will be set in a property.
I also agree with the #22 that if the key could not be match in the dictionary it is better to return it instead of throwing an error, but I think my proposal and this issue should be two distinct enhancement.
from app-localize-behavior.
Just trying to understand this: if there's no languages in the dictionary (or, if there's just one), why would you use the behaviour? Or do you mean that (let's say) you only have english and french in the dictionary, and the browser language is spanish, which isn't in the dictionary?
If it's the latter, I think this might solve your problem, maybe? #22
from app-localize-behavior.
Any update about this feature request?
from app-localize-behavior.
Related Issues (20)
- Safari 9.1 El Capitan - Crash on localize HOT 1
- Feature request: let developer toggle showing the keys instead of translation
- Sub object in json sections HOT 3
- extending Polymer.AppLocalizeBehavior HOT 5
- Consider using `lang` property & attribute instead of `language`
- Feature Request: Add option to load resource (xhr) having withCredentials = true
- Reconsider format.js as core dependency HOT 2
- Support customizing the extracting of translations from resource file HOT 1
- How to use within a dom-repeat template
- Introduce fallback language HOT 4
- Feature Request: Fallback for language variants to it's superset
- remove intl-messageformat polyfill HOT 2
- Missing string when no locale in the resources
- Typo in French translation
- Cannot set property 'IntlMessageFormat' of undefined HOT 8
- Error 'this.localize is not a function' on tests HOT 1
- Demo not working
- support to pass array value to localize() method
- upgrade demo to polymer 3 abandon polymer-legacy
- Resources request pending while localize already called
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 app-localize-behavior.