Comments (2)
It sounds as if the element.key is not matching the value being passed into as value. What is happening in the code you posted above is angular walks each item in the localize.dictionary array and checks to see if the element.key matches the passed in value and adds it to a result array that is returned from the call to $filter.
You can set a break point in the browser on the line return element.key === value; and should see it doing the comparison.
Hope this helps.
from angularjs-localizationservice.
Huge thanks for your answer :)
I'm using Firefox 24.0 and Firebug. If i set a checkpoint on "return element.key === value;" it doesn't stop there. If I set the checkpoint on the line above and start debugging, it doesn't reach the line either.
edit:
I'm using data-i18n="welcomeHeader" right now to call the service and the following language file:
[
{
"key":"welcomeHeader",
"value":"Welcome to CASCADE",
"description":"Home page greeting text"
},
{
"key":"loginButton",
"value":"Log In",
"description":"login button text"
}
]
The value which is compared with element.key is welcomeHeader
from angularjs-localizationservice.
Related Issues (20)
- Pre-included localization .js files HOT 2
- i18nAttr not updated HOT 2
- Why 'localize' service is always running HOT 4
- Fall back on default resource file when key is not present in localized resource file HOT 3
- Translating placeholder attributes HOT 1
- Dynamic model and translate HOT 1
- PRoblem with IE8 HOT 3
- Changing file extension for dictionaries from .js to .json HOT 1
- Wrong URL for resources-locale_default.js HOT 1
- HTML in JSON not rendered HOT 1
- using i18n for localization does not show translation in internet explorer (IE) 9 HOT 2
- Localization of images HOT 3
- Further thoughts and scope of localization on larger applications
- Could not able to parse French special characters HOT 4
- i18n filter HOT 8
- getLocalizedString filter returns an array!
- Not compatible with angular 1.3 HOT 1
- How to add a i18n label in a js file HOT 1
- Dynamic Dom HOT 1
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 angularjs-localizationservice.