require(["esri/map", "dojo/i18n"], function (map, i18nStrings) { dojo.requireLocalization("com.esri.template", "localizedStrings"); var nlsStrings = dojo.i18n.getLocalization("com.esri.template", "localizedStrings"); });
Any my nls file content is
{ "outsideArea": "You are currently outside the supported area", "geoLocationTimeOut": "Timeout exceeded. Unable to perform the operation", "positionUnavailable": "Position unavailable", "permissionDenied": "Permission denied to locate current location", }
Sounds like you are trying to create a localization file for a custom widget? If so it might help to download the code associated with the Elevation Profile Template. This template includes a custom widget that calculates the elevation profile - to see the widget code check out the files in the apl folder.