小编Osc*_*das的帖子

Xamarin.Forms中标签StringFormat的本地化

在xamarin形式中,我可以将文本本地化为一个标签,例如:
<Label Text="{x:Static resources:AppResources.Text}"/>

使用资源的命名空间:
<ContentView ... xmlns:resources="clr-namespace:ProjectName.Resources;assembly=ProjectName">

我还可以绑定一些值并将字符串格式添加到标签:
<Label Text="{Binding Value, StringFormat='The value is: {0}' }"/>

问题在于文本值是:未本地化。

谁可以同时绑定值和本地化StringFormat?

data-binding label localization string-formatting xamarin.forms

6
推荐指数
1
解决办法
821
查看次数