Changing custom settings causes language to change!

A user has reported

Tried completely removing, then reinstalling. At first the day/month appeared fine (with all the installed default settings, and no customization/changes). But after I turned off some icons, changed colors, and customized some other settings, as soon as it went back to displaying the watch face again I noticed it was now again in some other language instead of English. It looked like the language listed right above English if you look at the system language list. Not sure which language that is. I also want to note that of all the other watch faces I've tried or currently have installed, none of them have shown to have this issue. So it's not anything to do with my system settings. Hope this helps! I'd be happy to test it out again for you should you make any changes.

I cannot recreate this in the simulator. Any ideas?!
  • More info. I have various strings.xml files for different languages ENG, RUS etc. On this users watch when they change a setting the watch decides to pickup the RUS strings file even though the watch is in ENG!

    So I have

    resources-eng
    strings.xml

    resources-rus
    string.xml

    In the ENG one I have all the day and month names in English.

    In the RUS one I have all the day and month names in Russian. For example

    <resources>

    <strings>

    <string id="day0Name">???????????</string>

    <string id="day1Name">???????????</string>

    <string id="day2Name">???????</string>

    <string id="day3Name">?????</string>

    <string id="day4Name">???????</string>

    <string id="day5Name">???????</string>

    <string id="day6Name">???????</string>




    <string id="mon1Name">??????</string>

    <string id="mon2Name">???????</string>

    <string id="mon3Name">????</string>

    <string id="mon4Name">??????</string>

    <string id="mon5Name">???</string>

    <string id="mon6Name">????</string>

    <string id="mon7Name">????</string>

    <string id="mon8Name">??????</string>

    <string id="mon9Name">????????</string>

    <string id="mon10Name">???????</string>

    <string id="mon11Name">??????</string>

    <string id="mon12Name">???????</string>


    I read these in like this....

    function get_weekday_name(day)

    {

    var weekday_name_cache = null;

    weekday_name_cache = [

    Ui.loadResource(Rez.Strings.day0Name),

    Ui.loadResource(Rez.Strings.day1Name),

    Ui.loadResource(Rez.Strings.day2Name),

    Ui.loadResource(Rez.Strings.day3Name),

    Ui.loadResource(Rez.Strings.day4Name),

    Ui.loadResource(Rez.Strings.day5Name),

    Ui.loadResource(Rez.Strings.day6Name)

    ];

    return weekday_name_cache[day];

    }
  • I have managed to create this in the simulator. The simulator is set to ENGLISH but the Ui.loadResource(Rez.Strings.day0Name) call is picking up strings from the RUSSIAN resouce file.

    Surely the simulator/watch should load in the correct language resource file based upon the language set. It used to work in a previous version of the SDK. Is this a known bug?
  • Fixed it by moving the resource-eng etc folders up a level
  • Former Member
    Former Member
    ruperthawkes,

    I think we may have figured out what happened here. In your original project were your resources in the same directory as your project manifest file? If they were diwn a level, then we may have run into an issue where the compiler is looking at the top level for resources and missing them. This is because "When relative paths are used within a jungle file the path will be resolved against the Jungle file’s parent directory. Relative paths within the default.jungle are resolved against the parent directory of the manifest file that is found" (See: https://developer.garmin.com/connect-iq/programmers-guide/overriding-resources/) for more.

    Thanks,
    -Coleman
  • Yes.

    another thing. I have

    resources/strings.xml that has a string for example “test”

    i also have

    resources-eng/strings.xml thta has Eng specific strings, but not “test1”

    i get compiler warnings saying “test”is not defined for language eng. can I ignore these warnings?