How can i use a strings specific folder for a device
i can do it with layouts but when the stings folder always get the main resources sttrings
How can i use a strings specific folder for a device
i can do it with layouts but when the stings folder always get the main resources sttrings
resources/strings/strings.xml
and
resources-fenix3/strings/strings.xml
By default, string resources are expected to be in specific locations. Have a look at the section entitled Localization Resources in the Programmer’s Guide here for help:
https://developer.garmin.com/connect-iq/core-topics/build-configuration/
You can use jungles to change the location for resource files if you want to do something different.
Localization qualifiers are a way to specify language-specific string resources, and are specified as an ISO 639–2 language code. These qualifiers may be combined with either device or family qualifiers, and are always specified last in the qualifier naming scheme. For example:
resources-fre: Provides French language-specific string resources for all devicesresources-round-fre: Provides French language-specific string resources for round devices onlyresources-fenix5s-fre: Provides French language-specific string resources for fēnix 5 devices onlyDoes this (along with your response), imply that there's no built-in path for device-specific *default* string resources?
For example, without any other changes to the jungle file:
- English strings for round devices can be placed in resources-round-eng
- Default strings for round devices *cannot* be placed in resources-round
thanks a lot it was very helpful but i think it does not solve my problem, i need to use a reduce versión of strings for 16k devices
Then as Travis said, you have to override resource locations yourself, as there's no built-in specifier for 16K (datafield) devices.
The question is why are you able to do it with layouts and not strings?
This is (similar) to how I do it. (In this context: CIQ1 means 16 KB devices, and CIQ2 means > 16 KB devices)
# resource shared with other projects / libraries shared_resources = PATH_TO_SHARED_RESOURCES;PATH_TO_OTHER_SHARED_RESOURCES common_resourcePath = resources;$(shared_resources) ciq1_resourcePath = $(common_resourcePath);resources-ciq1 ciq2_resourcePath = $(common_resourcePath);resources-ciq2 # use ciq 2 as default, since the list of ciq 1 devices will never change base.resourcePath = $(ciq2_resourcePath) # set resource path for CIQ 1 devices fr920xt.resourcePath = $(ciq1_resourcePath) fenix3.resourcePath = $(ciq1_resourcePath) fenix3_hr.resourcePath = $(ciq1_resourcePath) d2bravo.resourcePath = $(ciq1_resourcePath) d2bravo_titanium.resourcePath = $(ciq1_resourcePath) fr230.resourcePath = $(ciq1_resourcePath) fr235.resourcePath = $(ciq1_resourcePath) fr630.resourcePath = $(ciq1_resourcePath) vivoactive.resourcePath = $(ciq1_resourcePath)