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:
The localization culture can be explicitly set in
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.
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);
string localizedCommandName = WorkflowInit.Runtime.GetLocalizedCommandName(processId,stateName); string localizedCommandName = WorkflowInit.Runtime.GetLocalizedCommandNameBySchemeId(schemeId,stateName);