Using SWITCHLANGUAGE for ingredient statements
You can use the
SWITCHLANGUAGE ObjMethod
to change the language of an
ingredient statement without altering the current order of the ingredients.
This
ObjMethod
performs these steps:
- Takes an argument list with two parameters, language
and category (e.g.,
language=FR-CA
andcategory=BEV
). - Changes the language and category of the current object.
- Moves through the list of rows
in the
Ingredients
detail code. - Retrieves the appropriate text in the new language. This is the same logic that was used during the original Ingredient Statement explosion.
- Replaces the old language on the Ingredients grid.
There are two ways to call this object method through scripting. Both
examples change the language to French (FR-FR
) and the
category to
BEV
.
ObjMethod("","","ObjectMethod","SWITCHLANGUAGE","language=FR-FR; category=BEV")
ObjMethod("","","SwitchLanguage","FR-FR","BEV")