• Current language in plugin

    Changes in:app

    You can now get the currently selected language inside a field type plugin with sbLanguage. Example:

    const Fieldtype = {
      mixins: [window.Storyblok.plugin],
      template: `<div>Language: {{ sbLanguage }}</div>`,
      methods: {
        initWith() {
          return {
            plugin: 'example_plugin'
          }
        },
        pluginCreated() {
          console.log(this.sbLanguage)
        }
      }
    }