Datapolis Process System SDK
Multilanguage in Functions
You can create multilanguage function. It means that on site with different languages it will be shown different in Workflow Designer. To prepare that you need:
Finally your *.resources files should be located in 15/WorkBox/Functions folder with your *.Functions.xml and *.Functions.Categories.xml files.
Resx files
You have to prepare standard Resx files in your project. For example files may look as below:
WBHour.Functions.resx
<
data
name
=
"FunctionCategoryDate"
xml:space
"preserve"
>
value
>SDK Date</
</
"WBHour_FunctionDescription"
>Returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).</
"WBHour_FunctionTitle"
>Hour</
"WBHour_Value_Description"
>Enter the date that contains the hour you want to find.</
"WBHour_Value_Title"
>Date</
WBHour.Functions.pl-PL.resx
>SDK Funkcje daty</
>Zwraca godzinę w postaci numeru seryjnego. Godzina jest określona liczbą całkowitą z zakresu od 0 do 23.</
>Godzina</
>Określa datę, z której chcesz uzyskać godzinę.</
>Data</
Fill xml files
I.e.: $Resources:Datapolis.WorkBox.Sdk.Samples.Functions,WBHour_FunctionTitle;
For example function file may look as below:
Functions
xmlns
"http://www.datapolis.com.pl/WorkBox/Functions.xsd"
Function
Name
"Datapolis.WorkBox.Sdk.Samples.Functions.WBHour"
Title
"$Resources:Datapolis.WorkBox.Sdk.Samples.Functions,WBHour_FunctionTitle;"
Description
"$Resources:Datapolis.WorkBox.Sdk.Samples.Functions,WBHour_FunctionDescription;"
Assembly
"Datapolis.WorkBox.Sdk.Samples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a68baededa28155"
Category
"SDK.Date"
Parameter
"Value"
"$Resources:Datapolis.WorkBox.Sdk.Samples.Functions,WBHour_Value_Title;"
"$Resources:Datapolis.WorkBox.Sdk.Samples.Functions,WBHour_Value_Description;"
Type
"String"
></
Converting to *.resources
The simplest way is to add post build event that use ResGen.exe (standard .NET Framework tool) to convert resx to *.resouce.
I.e. ResGen.exe WBHour.Functions.resx WBHour.Functions.resources
Then remember to put generated file in 15/WorkBox/Functions folder.