JohannesMoersch/QuickConverter

How to use QuickConverter expression with multi language resource text ?

Closed this issue · 2 comments

Hi All,

Is it possible to use QuickConverter expression with multi language resource text ?
My expression is like this

<TextBlock Text="{qc:MultiBinding '\'{x:Static resx:Resources.text_12} \' + $P0.ToString() + \' / trouvée(s) \' + $P1.ToString() + \')\'', P0={Binding PrintersCountExpected}, P1={Binding PrintersCountFound}}"/>

where {x:Static resx:Resources.text_12} comes from a resource langage file.
But it doesn't work. {x:Static resx:Resources.text_12} is displayed as text and is not interpreted by the parser.

You can pass the resource as an additional value

<TextBlock Text="{qc:MultiBinding '\'$V0\' + $P0.ToString() + \' / trouvée(s) \' + $P1.ToString() + \')\'', 
P0={Binding PrintersCountExpected}, 
P1={Binding PrintersCountFound}, 
V0={x:Static resx:Resources.text_12}}" />

It's working with removing the \' and extra chars :

<TextBlock Text="{qc:MultiBinding '$V0 + $P0.ToString() + $P1.ToString()', 
P0={Binding PrintersCountExpected}, 
P1={Binding PrintersCountFound}, 
V0={x:Static resx:Resources.text_12}}" />

Thank you,