You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
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 thelanguage
property is not in the dictionary thedefaultLanguage
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.
The text was updated successfully, but these errors were encountered: