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

[feature request] Add a default language property #20

Open
dgabrielli76 opened this issue Jun 2, 2016 · 3 comments
Open

[feature request] Add a default language property #20

dgabrielli76 opened this issue Jun 2, 2016 · 3 comments

Comments

@dgabrielli76
Copy link
Contributor

Description

I actually develop an application and I use the app-localize-behavior.
The fact is I want to check the user browser language to translate with it, but if this language is not in the dictionary, it does not work.
The proposal here is to create a new property defaultLanguage to be sure that even if the language property is not in the dictionary the defaultLanguage will be applied.

It is easy to extends the behavior but I do not think that I am the only to need it, so it should be great that the element implements it.

@notwaldorf
Copy link
Contributor

notwaldorf commented Jun 7, 2016

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

@dgabrielli76
Copy link
Contributor Author

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 defaultLanguagewill 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.

@dgabrielli76
Copy link
Contributor Author

Any update about this feature request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants