Multi language menu & footer - nuxt/slice-machine

Hey Marco, thanks for reaching out.

With @nuxtjs/prismic you can directly read the locales from $prismic into your page queries, like so:

// Example /_lang/_uid.vue file

[...]

  async asyncData({ $prismic, params, error }) {
    try {
      // All langs from the repo
      let languages = $prismic.api.data.languages

      // Set main language as default
      let lang = { lang: languages[0].id }

      // If there is a lang code in the URL set this as language option
      if (params.lang !== undefined || null) {
        lang = { lang: params.lang }
      }

      // Query to get localized menu content
      const menuContent = (await $prismic.api.getSingle('menu', lang ))

[...]

We have a full working example of this that you can check out here: Nuxt multi-language website