Skip to content
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

Allow resource deep objects #26

Open
8 tasks done
draco1989 opened this issue Jul 5, 2016 · 2 comments · May be fixed by #28
Open
8 tasks done

Allow resource deep objects #26

draco1989 opened this issue Jul 5, 2016 · 2 comments · May be fixed by #28

Comments

@draco1989
Copy link

draco1989 commented Jul 5, 2016

Description

The app-localize-behavior should allow to read deep JSON translation resources.

Expected outcome

Function .localize('my.deep.translation.greeting') should output a string

Actual outcome

The translation is not found.

Live Demo

Example: https://jsbin.com/nehajuconu/1/edit?html,output

Steps to reproduce

  1. Create a component with Polymer.AppLocalizeBehavior
  2. Supply a translation resource like {'en': {'my': {'greeting': 'hello_deep'}}}
  3. Try to translate {{localize('my.greeting')}}
  4. Should output hello_deep

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@draco1989 draco1989 mentioned this issue Jul 5, 2016
draco1989 added a commit to draco1989/app-localize-behavior that referenced this issue Jul 5, 2016
@draco1989 draco1989 linked a pull request Jul 5, 2016 that will close this issue
@garcianavalon
Copy link

+1 this is required for any complex translation object

@galanovnick
Copy link

+1 would be really greate to have this feature

jab added a commit to jab/app-localize-behavior that referenced this issue Sep 11, 2017
…Add language negotiation.

- Add optional `language`, `merge`, and `preprocessor` params to
  `loadResources`
- Add `negotiateLanguage` and `makeLookUpLanguage` static helper functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants