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:

  1. Takes an argument list with two parameters, language and category (e.g., language=FR-CA and category=BEV).
  2. Changes the language and category of the current object.
  3. Moves through the list of rows in the Ingredients detail code.
  4. Retrieves the appropriate text in the new language. This is the same logic that was used during the original Ingredient Statement explosion.
  5. 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")