Hey there.... hope somebody can help me with this.
i made a watchface app and need to set the Label text to use different languages (english and spanish).
Using eclipse on OSX, selected just the fenix3 and eng+spa languages in the wizard forms when project was created. This created the project folder including resources, resources-eng and resouces-spa subfolders.
tried the following scenarios:
scenario 1:
in resources/resource.xml :
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-Default</string>
<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
</resources>
in resouces-eng/resouces.xml:
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-English</string>
<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
</resources>
in resouces-spa/resouces.xml:
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-Spanish</string>
<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
</resources>
in the app:
function initialize() {
label = Ui.loadResource(Rez.Strings.LabelNoti);;
}
app runs but switching the language in the simulator does nothing.. the label is always "Notifications-Default".
tried running the app in the watch with same results... it always show the default label
scenario 2:
same files as last one just changing the app:
function compute(info) {
var texto = Ui.loadResource(Rez.Strings.LabelNoti);
return texto;
}
same results.
scenario 3:
resources/resources.xml:
<resources>
<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
</resources>
in resouces/strings.xml:
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-Default</string>
</resources>
in resouces-eng/strings.xml:
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-English</string>
</resources>
in resouces-spa/strings.xml:
<resources>
<string id="AppName">Watchface</string>
<string id="LabelNoti">Notifications-Spanish</string>
</resources>
app wont run.. it doesnt find the AppName string...i saw some examples using the strings.xml file to store strings instead of using resources.xml but for some reason it doesnt work for me
can somebody help me to make the label dynamic based on the language used??