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