I'm doing some trials with Polymers app-localize-behavior, and I'm having a hard time to find some clear documentation regarding how to use format.js's {select} Format found here.
The app-localization-behavior documentation says :
"Polymer.AppLocalizeBehavior supports the same message-syntax of format.js, in its entirety;"
But for example in the polymer docs they pass the arguments as strings:
{{localize('hello', 'Batman')}}
and in format.js docs not:
I have {numCats, number} cats.
Now the issue I'm facing is how to use the {select} Format.
The format.js docs says to use it like this:
{gender, select,
male {He}
female {She}
other {They}
} will respond shortly.
so I did this in my template:
{{localize(wir, select,
wir {we}
ich {i}
)
}}
locales.json :
{
"en" : {
"i" : "I",
"we" : "we"
},
"fr" : {
"i" : "je",
"we" : "nous"
},
"de" : {
"i" : "ich",
"we" : "wir"
}
}
The language is set by default to french "fr"
, so I expect to get "nous" as output, but instead the full {{localize(etc..)}}
is displayed on screen.
The last I did, was trying to pass everything as string or just some of the arguments (all combinations) but this all doesn't helps.
Did anyone faced the same issue or can somebody explain what I'm doing wrong here pls?
Help would be greatly appreciated.