<?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: LocalizationManager resources is undefined in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/806079#M2615</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;As I understand, your localization doesn't work at all even if you build a package an import it, correct?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, that's not quite accurate. If I build and import, then I can get the localized variables as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I write and debug the app in the developer visual.&amp;nbsp; While in the debugger visual, I make a localization request to get "&lt;SPAN&gt;DateYMD" and it returns "DateYMD" instead of "{month} {day}, {year}" for example.&amp;nbsp; My code relies on substituting the month value for {month}, the day value for {day} and the year value for {year} in the localized string so that I can properly display dates.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As I mentioned, date display is only one example, and I have other needs to change strings based on current user locale.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, because I can't get a string back from localizationManager while in the developer visual that includes {month} {day} {year} my string substitution fails.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A potential workaround would be to only return en-US or some other default locale while in the developer visual.&amp;nbsp; That would give me at least some data to work with.&amp;nbsp; The only thing I can think of now is to name the field something like {month}{day}{year} which seems wierd but maybe that would work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 21:40:30 GMT</pubDate>
    <dc:creator>ChrisWilliams</dc:creator>
    <dc:date>2019-09-30T21:40:30Z</dc:date>
    <item>
      <title>LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/620621#M1772</link>
      <description>&lt;P&gt;Hei any idea why my localizationManager is not working ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jant1.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/145937i991DBAE2372C04A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="jant1.png" alt="jant1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jant2.png" style="width: 241px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/145938i54F9B6F395EBDD38/image-size/large?v=v2&amp;amp;px=999" role="button" title="jant2.png" alt="jant2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have api version 2.3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 11:38:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/620621#M1772</guid>
      <dc:creator>mikihiir</dc:creator>
      <dc:date>2019-02-11T11:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/621436#M1773</link>
      <description>&lt;P&gt;Localization resources are not included if you run &lt;STRONG&gt;pbiviz start&lt;/STRONG&gt; (debug visual).&lt;/P&gt;
&lt;P&gt;To test localization you should generate a package by using &lt;STRONG&gt;pbiviz package&lt;/STRONG&gt; and import it into Power BI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know if it resolves the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/146115iEBBBE06CB8284CD3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 07:48:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/621436#M1773</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2019-02-12T07:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/800270#M2597</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&amp;nbsp;Do you have any idea if LocalizationManager resources will ever be available when running pbiviz start?&amp;nbsp; I have resources defined that have templating parameters for data substitution.&amp;nbsp; They don't work at all when I'm building the app, which means I really can't do localization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, here's a templating string that I use for displaying dates:&lt;/P&gt;&lt;P&gt;en-US&lt;/P&gt;&lt;P&gt;"DateYMD": "{month} {day}, {year}",&lt;/P&gt;&lt;P&gt;ja-JP:&lt;/P&gt;&lt;P&gt;"DateYMD": "{year}年{month}月{day}日",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously I format through the bracketed values to display dates for my supported languages, but I can't do this during development which is a real pain.&amp;nbsp;&amp;nbsp;I know I can use moment.js for dates, but this is just one of many examples, most of which are not date-related.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any news on this or recommended workarounds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 06:11:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/800270#M2597</guid>
      <dc:creator>ChrisWilliams</dc:creator>
      <dc:date>2019-09-24T06:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/805778#M2614</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pbiviz start still doesn't support LocalizationManager and I'm unsure will it be in the future or not.&lt;/P&gt;&lt;P&gt;As I understand, your localization doesn't work at all even if you build a package an import it, correct?&lt;/P&gt;&lt;P&gt;If so, please send your source code to&amp;nbsp;pbicvsupport@microsoft.com and I will look at it to find an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visu&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:02:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/805778#M2614</guid>
      <dc:creator>v-evelk</dc:creator>
      <dc:date>2019-09-30T15:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/806079#M2615</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;As I understand, your localization doesn't work at all even if you build a package an import it, correct?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, that's not quite accurate. If I build and import, then I can get the localized variables as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I write and debug the app in the developer visual.&amp;nbsp; While in the debugger visual, I make a localization request to get "&lt;SPAN&gt;DateYMD" and it returns "DateYMD" instead of "{month} {day}, {year}" for example.&amp;nbsp; My code relies on substituting the month value for {month}, the day value for {day} and the year value for {year} in the localized string so that I can properly display dates.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As I mentioned, date display is only one example, and I have other needs to change strings based on current user locale.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, because I can't get a string back from localizationManager while in the developer visual that includes {month} {day} {year} my string substitution fails.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A potential workaround would be to only return en-US or some other default locale while in the developer visual.&amp;nbsp; That would give me at least some data to work with.&amp;nbsp; The only thing I can think of now is to name the field something like {month}{day}{year} which seems wierd but maybe that would work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 21:40:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/806079#M2615</guid>
      <dc:creator>ChrisWilliams</dc:creator>
      <dc:date>2019-09-30T21:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: LocalizationManager resources is undefined</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/806640#M2617</link>
      <description>&lt;P&gt;Ok, got it now!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could provide some checks before formatting and substitution applying to avoid failures (as checking that string contains "{}")?&lt;/P&gt;&lt;P&gt;Yes, labels will be looked ugly, but your code will work under any conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visuals&lt;BR /&gt;pbicvsupport@microsoft.com&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 08:46:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/LocalizationManager-resources-is-undefined/m-p/806640#M2617</guid>
      <dc:creator>v-evelk</dc:creator>
      <dc:date>2019-10-01T08:46:42Z</dc:date>
    </item>
  </channel>
</rss>

