0
我对nativescript很新颖。我想弄清楚如何使用strings.xml中的字符串值,所以我可以本地化我的应用程序。在Nativescript中使用i18n字符串资源Android
我的布局看起来像这样。
<StackLayout class="page">
<label [text]="@string/a_value"></label>
<Label text="Hello world with tap!" class="yellow"></Label>
<button text="Tap me my friend" (tap)="tapTheButton()" class="red"></button>
<label [text]="text" class="blue"></label>
</StackLayout>
@ string/a_value应该从res/values/strings.xml文件中获取字符串。
欢迎任何帮助!
谢谢,我看了一下插件,它为我工作。干杯! – Wouter