The CIQ datafields' labels are not translated in the website. Note that the CIQ app is translated and looking at the same activity from Garmin Connect Android app the labels are translated, so this is a website issue.
Note that the CIQ app is translated and looking at the same activity from Garmin Connect Android app the labels are translated, so this is a website issue.
Hm, strange. If it is a CIQ datafield, then both GC Web and GCMobile just display the label as stored by the CIQ app into the activity FIT file. If the author of the app uses a localized label, it should be identical on both sides. Could you post screenshots from GCM and from GCW demonstrating the issue, and upload here a zipped FIT file of an activity with this datafield? (use the button Insert » File/image/Video » Upload)
No it is better than that. There are 2 "translations". The is is here in the MC code but it's stupid, useless:
var bpm = Ui.loadResource($.Rez.Strings.fitBpm);
mCurrentHRField = dataField.createField("h",0 /*CURR_HR_FIELD_ID*/, Fit.DATA_TYPE_UINT8,
{ :nativeNum=>3, :mesgType=>Fit.MESG_TYPE_RECORD, :units=>bpm });
so the units ("bpm") could be translated when the app saves the data. However I'm not talking about this, but rather about these @Strings:
<resources>
<fitContributions>
<fitField id="0"
displayInChart="true"
displayInActivityLaps="false"
displayInActivitySummary="false"
sortOrder="0"
precision="0"
chartTitle="@Strings.fitCurrentHeartRateChartTitle"
dataLabel="@Strings.fitCurrentHeartRate"
unitLabel="@Strings.fitBpm"
fillColor="#f25b0a" />
And these do work in Garmin Connect Android. When I changed the system language to Hungarian and looked at the same activity (saved a few days ago) then the fields were in Hungarian. These translations work similar to the settings: when you publish the app the xmls and the translates strings are uploaded and that is used when they display.
I don't know how to get the fit file, if you think it can help then let me know how and I'll also send it.
Android English:
{... And i was going to upload the screenshot from the phone itself. But of course I was too naive again, i thought that a website that can upload images from desktop in 2022 will be able to do so from the phone as well...}

Android Hungarian:
You can see that the last section is the ConnectIQ, and the labels are translated.
And the same activity from the Web when set to Hungarian:
Yes, you are right. I did not notice that GC Mobile does translate using the XML, because on iOS it does not work for me - always showing the same language (although strangely not English), even if I change the app language (on iOS you can) or the OS language. It looks like the GCM iOS app takes always the first language in the list of supported languages (alphabetically), ignoring the priority.
However, I now tested it with GCM Android, and it indeed translates strings that were passed as string handles, but not those passed as a value (like the bpm unit in your code example). Once passed as a value, even the GCM Android app cannot translate it.
You may want to report it on the Connect IQ Bug subforum. If it is not already there (I did not verify).
Well yes, but not sure if that's a bug or a feature :)
In the docs (developer.garmin.com/.../Session.html :units is NOT designated as optional, and actually the wording hints that it's required ("This SHOULD use the current device language"), however IF it is optional then not adding it has 2 improvements:
1. smaller memory footprint
2. it's being translated in the fitContributions.xml and now it is displayed according to the translation.
So IMHO the bug should be to fix the documentation to indicate that it is optional (and recommended) not to set? Or maybe there are a few bugs here: that whatever is in the fitContribution.xml + strings.xml should be used to override the value sent in the code....