When using a config that has localized strings in both EN and FR and the data-lang="fr" attribute set on the map element the layerName and metadataAccessPath use the English values and ignore the French values that have been set. The suportedLanguages property also creates a schema error.
Expected Behavior
When supporting both languages and the data-lang="fr" attribute is set on the map element, the French values from the config should be used.
Notice that both the French and the English map have the same layer names and class names in the legend.
View the console and the suportedLanguages property will throw a schema error
View the Network tab in the inspector and look at the Fetch/XHR calls you will see they point to the EN metadataAccessPath values and not the FR values
Anything else?
The ConfigValidation hardcodes the value of suportedLanguages to only include English on lines 190 and 203 instead of using the suportedLanguages value from the config.
I'd also recommend changing "suportedLanguages" to "supportedLanguages" for proper spelling of supported.
Is there an existing issue for this?
Current Behavior
When using a config that has localized strings in both EN and FR and the
data-lang="fr"
attribute set on the map element thelayerName
andmetadataAccessPath
use the English values and ignore the French values that have been set. ThesuportedLanguages
property also creates a schema error.Expected Behavior
When supporting both languages and the
data-lang="fr"
attribute is set on the map element, the French values from the config should be used.Steps To Reproduce
suportedLanguages
property will throw a schema errorAnything else?
The ConfigValidation hardcodes the value of suportedLanguages to only include English on lines 190 and 203 instead of using the suportedLanguages value from the config.
I'd also recommend changing "suportedLanguages" to "supportedLanguages" for proper spelling of supported.
Config from example: 3.json
EN Mapserver: https://maps-cartes.services.geo.ca/server2_serveur2/rest/services/StatCan/cd_socioeconomic_variables_2016_en/MapServer
FR Mapserver: https://maps-cartes.services.geo.ca/server2_serveur2/rest/services/StatCan/cd_socioeconomic_variables_2016_fr/MapServer