Workflow Engine supports localization of states, command names and names of input parameters for Commands out of the box. Localization constants are stored in the Localization section, which may be accessed by clicking on a corresponding button in Designer's toolbar. Each localization constant has the following properties that are available for modification:

  • ObjectName - name of a localized state, command or input parameter for a Command;
  • Type - State, Command or Parameter (input parameter for a Command);
  • IsDefault - this constant will be used, if a constant with the appropriate culture is not found;
  • Culture - Language Culture Name - culture name in format languagecode2-country/regioncode2; for instance, en-US, ru-RU, etc.;
  • Value - localization constant value.

The localization culture can be explicitly set in GetAvailableCommands and GetAvailableStateToSet methods. If it is not specified, the current culture CultureInfo.CurrentCulture is used. Assigning of a localized name to an object with the "ObjectName" name will be done in the following way: if there is a localization constant with the explicitly specified culture, then it is used; if there is not, but there is a localization constant with the IsDefault = true attribute, then the latter is used. If neither is true, then "ObjectName" is used as the localized name.

Object WorkflowRuntime has additional methods to obtain the localized object name. For states:

string localizedStateName = WorkflowInit.Runtime.GetLocalizedStateName(processId,stateName);
string localizedStateName = WorkflowInit.Runtime.GetLocalizedStateNameBySchemeCode(schemeCode,stateName);
string localizedStateName = WorkflowInit.Runtime.GetLocalizedStateNameBySchemeId(schemeId,stateName);

For commands:

string localizedCommandName = WorkflowInit.Runtime.GetLocalizedCommandName(processId,stateName);
string localizedCommandName = WorkflowInit.Runtime.GetLocalizedCommandNameBySchemeId(schemeId,stateName);