Skip to content

Introduce fallback language #116

@toshovski

Description

@toshovski

Description

In bigger applications the translations into different languages takes time and the translation is not always 100% complete. For this reason I would like to propose a fallbackLanguage attribute. This will fallback to the default language.

Expected outcome

Let say I have two variables:

'en': {
    'translated': "english",
    'not_translated': 'hello'
},
'fr': {
    'translated':"français"
}
  1. variable is translated in both languages
    When I try to use the fr language for translated it will return the french version of it
  2. variable is not translated
    When I try to use the fr language for not_translated it wil check the en dictionary i there's no translation will fallback into the english one.

Actual outcome

fr will return empty string

Live Demo

I already did an implementation of this feature: https://github.com/toshovski/app-localize-behavior

Do you still accept feature requests for polymer 1.x and 2.x elements?

Steps to reproduce

Browsers Affected

  • [ x] Chrome
  • [ x] Firefox
  • [ x] Safari 9
  • [ x] Safari 8
  • [ x] Safari 7
  • [ x] Edge
  • [ x] IE 11
  • [ x] IE 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions