RemoveOtherLanguageTranslations
You can use the RemoveOtherLanguageTranslations function to remove all language translations from multilingual header fields and descriptions, except the translation corresponding to the current browser language.
When to use
You can use this function to:
- Remove all translations except the current browser language from multilingual records.
- Retain only the browser language translation before further processing or saving.
Syntax
int RemoveOtherLanguageTranslations(string objSymbol, string objKey);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| objSymbol | string | Yes |
The symbol of the object.
Note: You can use empty quotation marks ("") for the current workflow symbol.
|
| objKey | string | Yes |
The key of the object.
Note: You can use empty quotation marks ("") for the current workflow symbol.
|
Return Value
- The application returns an integer representing the number of language translations removed.
- The application returns zero (0) if no translations are removed or the record has no additional language values.
Impact
All the translations except the current browser language from the header fields and description of the specified record are permanently removed.
Prerequisites
This function is applied only to header fields and descriptions. The label data and instruction data are not affected.
Examples
- Example 1
-
Removes the reference code and reference status code of each reference of the workflow’s object.
using System; using Formation.Shared.Defs; class ActionScript : FcProcFuncSetEventWF { public void wf_start() { int retVal = RemoveOtherLanguageTranslations("", ""); MessageList(retVal.ToString()); } }
- Description
-
The language translation is removed from the current object workflow and displays the count of number of language translations removed.
Note: Specifying the Object Symbol and Object Key allows the function to operate on a specific object instead of the current object.