updateLanguage

Added support for localized content

Initialize Passio configuration at the entry point to enable localized content.

  /**
   * Added support for localized content.
   * with a two digit ISO 639-1 language code will transform the food names and serving sizes in the SDK responses
   *
   * @param languageCode - with a two digit ISO 639-1 language code
   */
  updateLanguage(languageCode: string): Promise<Boolean>
 try {
          // Fetch food results from the PassioSDK based on the query
          const result = await PassioSDK.updateLanguage("fr")
          console.warn(result)
        } catch (error) {
        }

Last updated