<?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 How to write two language in EG custom tasks? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84280#M8075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, guys!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recently, I learn how to write custom tasks for EG using C#. Now,&amp;nbsp; I have already finished one, the UI language is English. How to add another language, like the original task:&lt;/P&gt;&lt;P&gt;It has Chinese and English two language.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QQ截图20130124144329.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3026_QQ截图20130124144329.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do? Hope you guys give me a demo project, Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 06:49:14 GMT</pubDate>
    <dc:creator>Slash</dc:creator>
    <dc:date>2013-01-24T06:49:14Z</dc:date>
    <item>
      <title>How to write two language in EG custom tasks?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84280#M8075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, guys!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recently, I learn how to write custom tasks for EG using C#. Now,&amp;nbsp; I have already finished one, the UI language is English. How to add another language, like the original task:&lt;/P&gt;&lt;P&gt;It has Chinese and English two language.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QQ截图20130124144329.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3026_QQ截图20130124144329.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do? Hope you guys give me a demo project, Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 06:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84280#M8075</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2013-01-24T06:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write two language in EG custom tasks?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84281#M8076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few steps to make this work.&amp;nbsp; I'll summarize them here and hope that gets you started.&amp;nbsp; I may write a longer article on this topic if it's of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way .NET works, you can supply an alternative language for your application user interface by creating a &lt;EM&gt;satellite assembly&lt;/EM&gt;.&amp;nbsp; In the EG install folder, you'll see these assembly files (DLLs) in culture-specific subfolders (such as zh-CN for Simplified Chinese).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The satellite assemblies are small, and contain only language-specific resources such as message strings and UI pieces, no programming logic.&amp;nbsp; There are lots of tools and approaches for creating these.&amp;nbsp;&amp;nbsp; Some are point-and-click localizations tools, or some simply use .NET SDK-level tools.&amp;nbsp; Here's one resource - but you can search for others: &lt;A class="active_link" href="http://windowsdevcenter.com/pub/a/dotnet/2002/10/14/local2.htm?page=2" style="font-size: 10pt; line-height: 1.5em;" title="http://windowsdevcenter.com/pub/a/dotnet/2002/10/14/local2.htm?page=2"&gt;.NET Localization, Part 2: Creating Satellite Assemblies - O'Reilly Media&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satellite assemblies are good only when you actually externalize the localizable pieces outside of the program code.&amp;nbsp; For the task class (inherited from SAS.Tasks.Toolkit.SasTask), you can put the class into the Designer view in Visual Studio and change the Localizable property to True.&amp;nbsp; You would do the same for any part of the task that has a UI: Windows forms, controls, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For messages, you will need to put the message strings into a resource file (ex: Resources.resx) and then reference those resources from within your code &lt;EM&gt;instead&lt;/EM&gt; of the literal strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a satellite assembly built, you need to put it in a directory where the .NET runtime will find it.&amp;nbsp; Usually you place it in a subfolder relative to the location of the task DLL, using the culture-specific name for the folder.&amp;nbsp; For example, for Traditional Chinese you put place it in a "zh-CN" folder.&amp;nbsp; If you want one set of resources to serve all Chinese users, you could place it in the more generic "zh" folder.&amp;nbsp; The .NET runtime will load the most specific resource that it can find to match the current runtime culture.&amp;nbsp; If none are found, it will fall back to the "culture neutral" resource that is built into the main task DLL (usually English).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps as a starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 21:35:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84281#M8076</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-01-24T21:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write two language in EG custom tasks?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84282#M8077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Chirs!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Satellite assembly is a good thing, I am learning it, now I am familiar with it. If you &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;write a longer article on this topic&lt;/SPAN&gt;, that's best!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2013 05:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-write-two-language-in-EG-custom-tasks/m-p/84282#M8077</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2013-01-27T05:36:40Z</dc:date>
    </item>
  </channel>
</rss>

