Datapolis Process System SDK

Search:

Contents
:
IndexBookmarkPrint
Home > Activities > Multilanguage on Activities

Multilanguage on Activities

 

 

An activity is a part of Datapolis Process System therefore developing custom activity supports Multilanguage localizations.

 

The idea of developing Multilanguage activity is shown in steps below:

  1. Add the necessary translations that is Name/Value pair entries into a *.resx file.
  2. Set the particular Names to the proper activity members (activity or parameter attributes) in the activity XML file.
  3. Copy and paste the *.resx file. Rename the copied file by settings a culture that activity supports e.g. *.pl-PL.resx.
  4. Transform the *.resx files to the *.resources files. To do this use the .Net Framwork ResGen.exe standard tool. To automate this process the following script: ResGen.exe *.resx *.resources can be added to the project Post Build event.
  5. Copy *.resources files into Datapolis Process System Activity folder. This script: xcopy *.resources "%CommonProgramW6432%\microsoft shared\web server extensions\15\Workbox\Activities\" /y will be helpful.

Example


The following example shows how the Name/Value pair entries placed in *.resx file can be used in the XML activity one.

 

Resource file:

‚Äč

<data name="WBCreateListActivity_ActivityDescription" xml:space="preserve">
  <value>Add a new list or library to the selected web</value>
</data>
<data name="WBCreateListActivity_ActivityTitle" xml:space="preserve">
  <value>Code Sample: Create List</value>
</data>
<data name="WBCreateListActivity_IsQuickLuanch_Description" xml:space="preserve">
  <value>Specify whether a link to this document library appears in the Quick Launch.</value>
</data>
<data name="WBCreateListActivity_IsQuickLuanch_False" xml:space="preserve">
  <value>No</value>
</data>
<data name="WBCreateListActivity_IsQuickLuanch_Title" xml:space="preserve">
  <value>Navigation</value>
</data>
<data name="WBCreateListActivity_IsQuickLuanch_True" xml:space="preserve">
  <value>Yes</value>
</data>


XML activity file:

 

  <Activity Name="WBCreateListActivity" IsCallExternalActivity="False"
    NamespaceName="clr-namespace:Datapolis.WorkBox.Sdk.Samples.Activities;Assembly=Datapolis.WorkBox.Sdk.Samples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a68baededa28155"
    Title="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_ActivityTitle;"
    Description="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_ActivityDescription;" >
    <Parameters>
      <Parameter Name="IsQuickLuanch" Value="True" Type="Bool"
        Title="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_IsQuickLuanch_Title;"
        Description="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_IsQuickLuanch_Description;">
        <ValueOptions>
          <ValueOption Title="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_IsQuickLuanch_True;" Value="True" />
          <ValueOption Title="$Resources:Datapolis.WorkBox.Sdk.Samples.Activities,WBCreateListActivity_IsQuickLuanch_False;" Value="False" />
        </ValueOptions>
      </Parameter>
    </Parameters>
    <Graph></Graph>
  </Activity>
</Activities>