<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: intl fetchMessageBundle for existing widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092719#M74425</link>
    <description>&lt;P&gt;Ok, thanks René.&lt;/P&gt;&lt;P&gt;I was looking into it because when the widget is wrapped in an Expand, only the&amp;nbsp;&lt;SPAN&gt;expandTooltip is shown on hover (title) and results to the default ("Expand" in En, and "Développer" in Fr). I was hoping to capture the label from the widget to override using&amp;nbsp;expandTooltip() so that a user with a screen reader will be able to read the widget label instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Aug 2021 15:11:37 GMT</pubDate>
    <dc:creator>René_Ténière</dc:creator>
    <dc:date>2021-08-26T15:11:37Z</dc:date>
    <item>
      <title>intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092699#M74422</link>
      <description>&lt;P&gt;I have been trying to access the message bundle for existing widgets, i.e. Legend. The instructions are clear on creating and accessing your own custom widget bundles, however, I need to access the locale specific label for an existing widget. What do I use for the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-intl.html#fetchMessageBundle" target="_self"&gt;BundleID &lt;/A&gt;for&amp;nbsp;&lt;SPAN&gt;@arcgis/core/widgets/Legend as an example?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;René&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092699#M74422</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2021-08-26T14:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092701#M74423</link>
      <description>&lt;P&gt;Sorry, the locales for existing widgets are not extensible at this time.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:40:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092701#M74423</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-08-26T14:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092719#M74425</link>
      <description>&lt;P&gt;Ok, thanks René.&lt;/P&gt;&lt;P&gt;I was looking into it because when the widget is wrapped in an Expand, only the&amp;nbsp;&lt;SPAN&gt;expandTooltip is shown on hover (title) and results to the default ("Expand" in En, and "Développer" in Fr). I was hoping to capture the label from the widget to override using&amp;nbsp;expandTooltip() so that a user with a screen reader will be able to read the widget label instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 15:11:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092719#M74425</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2021-08-26T15:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092774#M74437</link>
      <description>&lt;P&gt;If that's the case, you can do something like this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(() =&amp;gt; {
    bgExpand.expandTooltip = `${bgExpand.label} ${basemapGallery.label}`;
});&lt;/LI-CODE&gt;&lt;P&gt;I think this will help get you there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://codepen.io/odoe/pen/powJRyM?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/powJRyM?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The widget labels will change with locales, so you can update the expandTooltip from another widget. You do need to widget.watch("label", method) or wait for view.when() to get the labels.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 16:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092774#M74437</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-08-26T16:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092776#M74438</link>
      <description>&lt;P&gt;After doing more research, a quick hack is to do the following:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import esriConfig from "@arcgis/core/config.js";
import * as intl from "@arcgis/core/intl";

export function functionName() {
    var lang = intl.getLocale().toLowerCase().slice(0, 2);
    var widgetsAssetsPath = esriConfig.assetsPath + "/esri/widgets/";
    var legendT9n = `${widgetsAssetsPath}${widget.widget_id}/t9n/${widget.widget_id}_${lang}.json`;
    var t9n = {widgetLabel: "Layer List"}; // Default value
    returnConfig(legendT9n).then(t9nResults =&amp;gt; {
        if(t9nResults){
            t9n = t9nResults;
        }
    }).then(function (){
        console.log(t9n.widgetLabel);
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just something for now so I don't have to define the labels elsewhere...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 16:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092776#M74438</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2021-08-26T16:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: intl fetchMessageBundle for existing widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092778#M74439</link>
      <description>&lt;P&gt;Yes, that looks good... Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 16:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intl-fetchmessagebundle-for-existing-widget/m-p/1092778#M74439</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2021-08-26T16:39:31Z</dc:date>
    </item>
  </channel>
</rss>

