diff --git a/src/bundle/Resources/public/js/scripts/helpers/config.loader.js b/src/bundle/Resources/public/js/scripts/helpers/config.loader.js index 4e27206779..7fbfb1a3f5 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/config.loader.js +++ b/src/bundle/Resources/public/js/scripts/helpers/config.loader.js @@ -5,6 +5,7 @@ import * as formError from './form.error.helper'; import * as formValidation from './form.validation.helper'; import * as highlight from './highlight.helper'; import * as icon from './icon.helper'; +import * as content from './content.helper'; import * as location from './location.helper'; import * as middleEllipsis from './middle.ellipsis'; import * as notification from './notification.helper'; @@ -27,6 +28,7 @@ import * as user from './user.helper'; ibexa.addConfig('helpers.formValidation', formValidation); ibexa.addConfig('helpers.highlight', highlight); ibexa.addConfig('helpers.icon', icon); + ibexa.addConfig('helpers.content', content); ibexa.addConfig('helpers.location', location); ibexa.addConfig('helpers.ellipsis.middle', middleEllipsis); ibexa.addConfig('helpers.notification', notification); diff --git a/src/bundle/Resources/public/js/scripts/helpers/content.helper.js b/src/bundle/Resources/public/js/scripts/helpers/content.helper.js new file mode 100644 index 0000000000..9ce4f88c05 --- /dev/null +++ b/src/bundle/Resources/public/js/scripts/helpers/content.helper.js @@ -0,0 +1,5 @@ +const getEditLanguageCode = () => { + return window.document.querySelector('meta[name="LanguageCode"]')?.content; +}; + +export { getEditLanguageCode };