languages property

List<OpenFoodFactsLanguage>? languages
getter/setter pair

The languages field should be used when a product is requested with fields in multiple languages. I.e.:

  • when some of the IN_LANGUAGES fields are used (e.g. ProductField.NAME_IN_LANGUAGES).
  • when Product's text fields are wanted to be filled with either of several languages in prioritized manner

However, the IN_LANGUAGES fields are also compatible with the language field - if only 1 language is needed, language can be used.

Please see https://github.com/openfoodfacts/openfoodfacts-dart/blob/master/DOCUMENTATION.md#about-languages-mechanics for detailed explanation on how to work with multiple languages.

Implementation

List<OpenFoodFactsLanguage>? languages;