Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Binding Resource Key ( in a Multilingual app) with StringFormat option.

$
0
0

Hi guys,

Has anyone tried binding the resource Keys with the StringFormat options?
I have a label like :

<Label Text="{Binding CurrAge, StringFormat='Current age: {0}'}" />

While the above works goof for English version.
I am planning to add Resource keys for a multi-lingual application.
I do not know how to use both StringFormat and ResourceKey at once,

For example

// keyCurrAge is key which holds value => 'Current age: {0}'
<Label Text="{Binding Resources[keyCurrAge]}" />

I tried following, but not working

<Label Text="{Binding Resources[keyCurrAge] , StringFormat='Current age: {0}'}" />

Any ideas, thoughts? (Other than using two different labels, please)

Regards,
N Baua


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>