Detect editor locale while in preview mode

Is there a way to pass the locale that is selected in the visual editor (dropdown near the top) to be received by the code? Closest thing I could find is passing targeting options through dynamic preview URLs, but this only applies to the targeting options of the content and does not account for the editor state.

Hello @alexfivenine,

I’ve shared a recording below that I hope answers your question. I cover how to see your {state} in the Visual Editor as well as how to access the locale

If you’d like to retrieve the locale you can use [state.locale]

05B4F2C9-DDA2-4F80-952D-3183EE04DE63_4_5005_c

Please let me know if there’s anything else I may be able to clarify.

Thanks for the reply, @JuliusGD, it was helpful. I was mostly interested in accessing state within my react code. I was able to find what I need in this thread: Accessing builderState in custom components withChildren - #4 by will